diff options
author | Mauro Sardara <msardara+fdio@cisco.com> | 2017-06-03 12:38:46 +0200 |
---|---|---|
committer | Mauro Sardara <msardara+fdio@cisco.com> | 2017-06-03 12:40:17 +0200 |
commit | c1be149705b704ee58851a52146214c192809e4b (patch) | |
tree | 36b99381f30b07625ba4015b90749287371619e8 /emu-radio/scripts | |
parent | 41054ff283c90212e3d8280055093ac9f465317d (diff) |
- Adding support for GRE tunnels to LTE emulation
- Fix version of NS3 emulator
Change-Id: I8dbf54d2234053b3417531daaef228f9b7d201d9
Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
Diffstat (limited to 'emu-radio/scripts')
-rw-r--r-- | emu-radio/scripts/build-package.sh | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/emu-radio/scripts/build-package.sh b/emu-radio/scripts/build-package.sh index 127d785a..1aa828d0 100644 --- a/emu-radio/scripts/build-package.sh +++ b/emu-radio/scripts/build-package.sh @@ -3,6 +3,7 @@ set -euxo pipefail IFS=$'\n\t' +SCRIPT_PATH=$( cd "$(dirname "${BASH_SOURCE}")" ; pwd -P ) APT_PATH=`which apt-get` || true apt_get=${APT_PATH:-"/usr/local/bin/apt-get"} @@ -153,6 +154,22 @@ build() { make } +change_version() { + OLD_PACKAGE=$1 + NEW_PACKAGE=$2 + B_NUMBER=$3 + + mkdir tmp + pushd tmp + ar p ../${OLD_PACKAGE} control.tar.gz | tar -xz + sed -i s/3.24.1-8/3.24.1-${B_NUMBER}/g control + mv ../${OLD_PACKAGE} ../${NEW_PACKAGE} + tar czf control.tar.gz *[!z] + ar r ../${NEW_PACKAGE} control.tar.gz + popd + rm -rf tmp +} + ARCHITECTURE=`uname -m` # Figure out what system we are running on @@ -201,28 +218,29 @@ fi BLD_NUMBER=${BUILD_NUMBER:-"1"} # Install libns3 -pushd ../ns3-packages +pushd ${SCRIPT_PATH}/../ns3-packages sudo dpkg -i *.deb || true sudo apt-get -f install -y --allow-unauthenticated || true popd # Build wifi-emualtor -pushd .. +pushd ${SCRIPT_PATH}/.. build "-DWIFI=ON -DLTE=OFF" make package find . -not -name '*.deb' -not -name '*.rpm' -print0 | xargs -0 rm -rf -- || true popd # Build lte-emualtor -pushd .. +pushd ${SCRIPT_PATH}/.. build "-DLTE=ON -DWIFI=OFF" make package find . -not -name '*.deb' -not -name '*.rpm' -print0 | xargs -0 rm -rf -- || true popd # Change build number to ns3 packages -pushd ../ns3-packages -mv libns3sx-3v5_3.24.1-6~xenial_amd64.deb libns3sx-3v5_3.24.1-$BLD_NUMBER~xenial_amd64.deb || true -mv libns3sx-dev_3.24.1-6~xenial_amd64.deb libns3sx-dev_3.24.1-$BLD_NUMBER~xenial_amd64.deb || true -mv ns3sx_3.24.1-6~xenial_amd64.deb ns3sx_3.24.1-$BLD_NUMBER~xenial_amd64.deb || true -popd
\ No newline at end of file +pushd ${SCRIPT_PATH}/../ns3-packages + +change_version libns3sx-3v5_3.24.1-8~xenial_amd64.deb libns3sx-3v5_3.24.1-$BLD_NUMBER~xenial_amd64.deb ${BLD_NUMBER} || true +change_version libns3sx-dev_3.24.1-8~xenial_amd64.deb libns3sx-dev_3.24.1-$BLD_NUMBER~xenial_amd64.deb ${BLD_NUMBER} || true +change_version ns3sx_3.24.1-8~xenial_amd64.deb ns3sx_3.24.1-$BLD_NUMBER~xenial_amd64.deb ${BLD_NUMBER} || true +popd |