3 # Copyright (c) 2016 Cisco and/or its affiliates.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at:
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
18 URL="https://nexus.fd.io/service/local/artifact/maven/content"
22 if [ -f "/etc/redhat-release" ]; then
23 trap 'rm -f *.rpm.md5; exit' EXIT
24 trap 'rm -f *.rpm.md5;rm -f *.rpm; exit' ERR
26 VPP_REPO_URL_PATH="./VPP_REPO_URL_CENTOS"
27 if [ -e "$VPP_REPO_URL_PATH" ]; then
28 VPP_REPO_URL=$(cat $VPP_REPO_URL_PATH)
29 REPO=$(echo ${VPP_REPO_URL#https://nexus.fd.io/content/repositories/})
30 REPO=$(echo ${REPO%/io/fd/vpp/})
32 REPO='fd.io.master.centos7'
37 ARTIFACTS="vpp vpp-debuginfo vpp-devel vpp-lib vpp-plugins"
40 VPP_INSTALL_COMMAND="rpm -ivh *.rpm"
42 trap 'rm -f *.deb.md5; exit' EXIT
43 trap 'rm -f *.deb.md5;rm -f *.deb; exit' ERR
45 VPP_REPO_URL_PATH="./VPP_REPO_URL_UBUNTU"
46 if [ -e "$VPP_REPO_URL_PATH" ]; then
47 VPP_REPO_URL=$(cat $VPP_REPO_URL_PATH)
48 REPO=$(echo ${VPP_REPO_URL#https://nexus.fd.io/content/repositories/})
49 REPO=$(echo ${REPO%/io/fd/vpp/})
51 REPO='fd.io.master.ubuntu.xenial.main'
56 ARTIFACTS="vpp vpp-dbg vpp-dev vpp-dpdk-dkms vpp-lib vpp-plugins"
59 VPP_INSTALL_COMMAND="dpkg -i *.deb"
62 for ART in ${ARTIFACTS}; do
63 for PAC in $PACKAGE; do
64 curl "${URL}?r=${REPO}&g=${GROUP}&a=${ART}&p=${PAC}&v=${VER}&c=${CLASS}" -O -J || exit
68 for FILE in ${FILES}; do
69 echo " "${FILE} >> ${FILE}.md5
72 for MD5FILE in ${MD5FILES}; do
73 md5sum -c ${MD5FILE} || exit
76 if [ "$1" != "--skip-install" ]; then
78 sudo ${VPP_INSTALL_COMMAND}
80 echo VPP Installation skipped