aboutsummaryrefslogtreecommitdiffstats
path: root/libccnx-transport-rta
diff options
context:
space:
mode:
authorMauro Sardara <msardara+fdio@cisco.com>2017-04-19 17:49:23 +0200
committerMauro Sardara <msardara+fdio@cisco.com>2017-04-19 16:04:19 +0000
commitfe3052d3a135ec679fb38e915adbd0554f565674 (patch)
treef7a8c996d4ec4b7a5ae916ef66e614e7e3a31c34 /libccnx-transport-rta
parentdab60bdfb83121478b37f70a8321480e39f7bc7f (diff)
Adding possibility to run build script from any directory.
Change-Id: Ic59fb41fcf7563b23dd14d3a773831a58a0f224e Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
Diffstat (limited to 'libccnx-transport-rta')
-rw-r--r--libccnx-transport-rta/scripts/build-package.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/libccnx-transport-rta/scripts/build-package.sh b/libccnx-transport-rta/scripts/build-package.sh
index 6b92bc16..9d4b13f6 100644
--- a/libccnx-transport-rta/scripts/build-package.sh
+++ b/libccnx-transport-rta/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"}
@@ -196,7 +197,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 ..
@@ -214,6 +215,6 @@ build_package() {
}
PACKAGE_NAME="LIBCCNX_TRANSPORT_RTA"
-pushd ..
+pushd $SCRIPT_PATH/..
build_package $PACKAGE_NAME
popd