fuel_plugin: Working version on Montreal POD
[ovsnfv.git] / fuel-plugin-ovsnfv / pre_build_hook
1 #!/bin/bash
2
3 set -eux
4
5 BUILD_FOR=${BUILD_FOR:-ubuntu}
6 DIR="$(dirname `readlink -f $0`)"
7 TMP=${DIR}/tmp
8
9 INCLUDE_DEPENDENCIES=${INCLUDE_DEPENDENCIES:-true}
10 ovs_ref=${ovs_ref:-master}
11 dpdk_ref=${dpdk_ref:-2.1.0}
12 networking_ovs_dpdk=${networking_ovs_dpdk:-master}
13
14 rm -rf ${TMP}
15 mkdir -p ${TMP}
16
17 # sudo apt-get install -qq --reinstall --print-uris bash | perl -lne "/'(.*?)'/;print \$1"
18 if [ "$INCLUDE_DEPENDENCIES" = true ]
19 then
20   rm -rf ${DIR}/repositories/${BUILD_FOR}/*
21   wget --content-disposition -N -P ${DIR}/repositories/${BUILD_FOR}/ -i "${DIR}/ovs_package/${BUILD_FOR}/dependencies.txt"
22 fi
23
24 cd ${TMP}
25
26 git clone https://github.com/openstack/networking-ovs-dpdk --branch stable/kilo --single-branch networking-ovs-dpdk
27 rm -rf ${TMP}/networking_ovs_dpdk/.git
28 tar cfz ${DIR}/repositories/${BUILD_FOR}/networking-ovs-dpdk.tgz networking-ovs-dpdk
29
30 git clone https://github.com/openvswitch/ovs
31 cd ovs
32 git checkout 1e77bbe565bbf5ae7f4c47f481a4097d666d3d68
33 cd ..
34 rm -rf ${TMP}/ovs/.git
35 tar cfz ${DIR}/repositories/${BUILD_FOR}/ovs.tgz ovs
36
37 git clone http://dpdk.org/git/dpdk --branch v2.0.0 --single-branch dpdk
38 rm -rf ${TMP}/dpdk/.git
39 tar cfz ${DIR}/repositories/${BUILD_FOR}/dpdk.tgz dpdk
40
41 cd $DIR
42 rm -rf ${TMP}