CSIT-454: HC Test: Update module feature names
[csit.git] / resources / tools / download_hc_pkgs.sh
1 #!/bin/bash
2
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:
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
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.
15
16 set -ex
17
18 trap 'rm -f *.deb.md5; exit' EXIT
19 trap 'rm -f *.deb.md5;rm -f *.deb; exit' ERR
20
21 URL="https://nexus.fd.io/service/local/artifact/maven/content"
22 VER="RELEASE"
23 REPO='fd.io.master.ubuntu.trusty.main'
24 GROUP="io.fd.vpp"
25 HC_GROUP="io.fd.hc2vpp"
26 NSH_GROUP="io.fd.nsh_sfc"
27 VPP_ARTIFACTS="vpp vpp-dbg vpp-dev vpp-dpdk-dev vpp-dpdk-dkms vpp-lib vpp-plugins"
28 HC_ARTIFACTS="honeycomb"
29 NSH_ARTIFACT="vpp-nsh-plugin"
30 PACKAGE="deb deb.md5"
31 CLASS="deb"
32
33 for ART in ${VPP_ARTIFACTS}; do
34     for PAC in $PACKAGE; do
35         curl "${URL}?r=${REPO}&g=${GROUP}&a=${ART}&p=${PAC}&v=${VER}&c=${CLASS}" -O -J || exit
36     done
37 done
38
39 for ART in ${HC_ARTIFACTS}; do
40     for PAC in $PACKAGE; do
41         curl "${URL}?r=${REPO}&g=${HC_GROUP}&a=${ART}&p=${PAC}&v=${VER}&c=${CLASS}" -O -J || exit
42     done
43 done
44
45 for ART in ${NSH_ARTIFACTS}; do
46     for PAC in $PACKAGE; do
47         curl "${URL}?r=${REPO}&g=${NSH_GROUP}&a=${ART}&p=${PAC}&v=${VER}&c=${CLASS}" -O -J || exit
48     done
49 done
50
51 for FILE in *.deb; do
52     echo " "${FILE} >> ${FILE}.md5
53 done
54
55 for MD5FILE in *.md5; do
56     md5sum -c ${MD5FILE} || exit
57 done

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.