aboutsummaryrefslogtreecommitdiffstats
path: root/metis
diff options
context:
space:
mode:
authorMauro Sardara <msardara+fdio@cisco.com>2017-04-19 17:52:46 +0200
committerMauro Sardara <msardara+fdio@cisco.com>2017-04-19 17:52:46 +0200
commit9e8e5c18fb03f7eb2d4348355b5a07b235f6e672 (patch)
tree3bbe4d760a3b97e4489f348af1caac6849687e0d /metis
parent240180fa4fa9c32af91fca4304a83ae9626fd0b6 (diff)
Adding possibility to run build script from any folder.
Change-Id: I809e489befecd73944212849696217a60f2598ec Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
Diffstat (limited to 'metis')
-rw-r--r--metis/scripts/build-package.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/metis/scripts/build-package.sh b/metis/scripts/build-package.sh
index 76a4759a..d61249be 100644
--- a/metis/scripts/build-package.sh
+++ b/metis/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"}
@@ -197,7 +198,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 ..
@@ -216,6 +217,6 @@ build_package() {
}
PACKAGE_NAME="METIS"
-pushd ..
+pushd $SCRIPT_PATH/..
build_package $PACKAGE_NAME
popd