summaryrefslogtreecommitdiffstats
path: root/fuel-plugin-ovsnfv/pre_build_hook
diff options
context:
space:
mode:
authorBilly O'Mahony <billy.o.mahony@intel.com>2016-01-06 17:00:41 +0000
committerBilly O'Mahony <billy.o.mahony@intel.com>2016-01-06 17:14:07 +0000
commit93f7683a2cd9b8020f8870dfc6b162b3d61c3fd2 (patch)
treefa7573a61d24cd0712920a04c07e2b48a1020644 /fuel-plugin-ovsnfv/pre_build_hook
parentebf6ae51abdaa29eb8eaf9bc41a4187bac6ec0ff (diff)
fuel plugin: Initial version
Change-Id: Ib41afff8f0b0f5e7c2f92f78cbdc48c99891b1ab Signed-off-by: Mark D. Gray <mark.d.gray@intel.com> Signed-off-by: Billy O'Mahony <billy.o.mahony@intel.com> Signed-off-by: Michal Ptacek <michalx.ptacek@intel.com>
Diffstat (limited to 'fuel-plugin-ovsnfv/pre_build_hook')
-rwxr-xr-xfuel-plugin-ovsnfv/pre_build_hook43
1 files changed, 43 insertions, 0 deletions
diff --git a/fuel-plugin-ovsnfv/pre_build_hook b/fuel-plugin-ovsnfv/pre_build_hook
new file mode 100755
index 0000000..c8d1ce3
--- /dev/null
+++ b/fuel-plugin-ovsnfv/pre_build_hook
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+set -eux
+
+BUILD_FOR=${BUILD_FOR:-ubuntu}
+DIR="$(dirname `readlink -f $0`)"
+TMP=${DIR}/tmp
+
+INCLUDE_DEPENDENCIES=${INCLUDE_DEPENDENCIES:-true}
+ovs_ref=${ovs_ref:-master}
+dpdk_ref=${dpdk_ref:-2.1.0}
+networking_ovs_dpdk=${networking_ovs_dpdk:-master}
+
+rm -rf ${TMP}
+mkdir -p ${TMP}
+rm -rf ${DIR}/repositories/${BUILD_FOR}/*
+
+# sudo apt-get install -qq --reinstall --print-uris bash | perl -lne "/'(.*?)'/;print \$1"
+if [ "$INCLUDE_DEPENDENCIES" = true ]
+then
+ wget --content-disposition -N -P ${DIR}/repositories/${BUILD_FOR}/ -i "${DIR}/ovs_package/${BUILD_FOR}/dependencies.txt"
+fi
+
+cd ${TMP}
+
+rm -rf ${TMP}/networking-ovs-dpdk
+git clone https://github.com/openstack/networking-ovs-dpdk ${TMP}/networking-ovs-dpdk
+#rm -rf ${TMP}/networking-ovs-dpdk/.git #Install requires this to be a git repo
+tar cfz ${DIR}/repositories/${BUILD_FOR}/networking-ovs-dpdk.tgz networking-ovs-dpdk
+
+rm -rf ${TMP}/ovs
+git clone https://github.com/openvswitch/ovs --branch master --single-branch ovs
+rm -rf ${TMP}/ovs/.git
+tar cfz ${DIR}/repositories/${BUILD_FOR}/ovs.tgz ovs
+
+rm -rf ${TMP}/dpdk
+git clone http://dpdk.org/git/dpdk --branch v2.1.0 --single-branch dpdk
+rm -rf ${TMP}/dpdk/.git
+tar cfz ${DIR}/repositories/${BUILD_FOR}/dpdk.tgz dpdk
+
+cd -
+rm -rf ${TMP}
+