summaryrefslogtreecommitdiffstats
path: root/cicn-plugin
diff options
context:
space:
mode:
authorMauro Sardara <msardara+fdio@cisco.com>2017-04-19 17:50:34 +0200
committerMauro Sardara <msardara+fdio@cisco.com>2017-04-19 17:50:34 +0200
commit00c88065d34438770e95b634f6bcf2eae994b4d4 (patch)
tree620423cbb15adc5bd2d2990b2e0b7d278ca6419f /cicn-plugin
parent1da3e15e937fef91d68fc09f4c1903079460980e (diff)
Adding possibility to run build script from any folder.
Change-Id: I6237ca5282704f83db3df82ba7617defa559896f Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
Diffstat (limited to 'cicn-plugin')
-rw-r--r--cicn-plugin/scripts/build-package.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/cicn-plugin/scripts/build-package.sh b/cicn-plugin/scripts/build-package.sh
index f91cab52..5af305ce 100644
--- a/cicn-plugin/scripts/build-package.sh
+++ b/cicn-plugin/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"}
@@ -186,7 +187,7 @@ build_package() {
hostname
# Make the package
- mkdir -p build && pushd build
+ mkdir -p $SCRIPT_PATH/../build && pushd $SCRIPT_PATH/../build
rm -rf *
cmake -DCMAKE_INSTALL_PREFIX=/usr -DRPM_PACKAGE=$RPM -DDEB_PACKAGE=$DEB -DDISTRIBUTION=$DISTRIB_CODENAME -DARCHITECTURE=$ARCHITECTURE ..
@@ -204,6 +205,6 @@ build_package() {
}
PACKAGE_NAME="VPP_PLUGIN"
-pushd ..
+pushd $SCRIPT_PATH/..
build_package $PACKAGE_NAME
popd