#!/bin/bash # Copyright (c) 2016 Open Platform for NFV Project, Inc. and its contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. 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} # sudo apt-get install -qq --reinstall --print-uris bash | perl -lne "/'(.*?)'/;print \$1" if [ "$INCLUDE_DEPENDENCIES" = true ] then rm -rf ${DIR}/repositories/${BUILD_FOR}/* wget --content-disposition -N -P ${DIR}/repositories/${BUILD_FOR}/ -i "${DIR}/ovs_package/${BUILD_FOR}/dependencies.txt" fi cd ${TMP} git clone https://github.com/openstack/networking-ovs-dpdk --branch stable/liberty --single-branch networking-ovs-dpdk rm -rf ${TMP}/networking_ovs_dpdk/.git tar cfz ${DIR}/repositories/${BUILD_FOR}/networking-ovs-dpdk.tgz networking-ovs-dpdk git clone https://github.com/openvswitch/ovs cd ovs git checkout 1e77bbe565bbf5ae7f4c47f481a4097d666d3d68 cd .. rm -rf ${TMP}/ovs/.git tar cfz ${DIR}/repositories/${BUILD_FOR}/ovs.tgz ovs git clone http://dpdk.org/git/dpdk --branch v2.0.0 --single-branch dpdk rm -rf ${TMP}/dpdk/.git tar cfz ${DIR}/repositories/${BUILD_FOR}/dpdk.tgz dpdk cd $DIR rm -rf ${TMP}