diff options
author | Mauro Sardara <msardara+fdio@cisco.com> | 2017-04-19 18:03:20 +0200 |
---|---|---|
committer | Mauro Sardara <msardara+fdio@cisco.com> | 2017-04-19 18:03:20 +0200 |
commit | ab05f3c8bb9112e61804515d1e06f7afec2e3fa6 (patch) | |
tree | adb6d6dda0708460666d61f4a3aae7dde368e080 | |
parent | d311023ba6291858008dcc663638dfe5c5324e22 (diff) |
Adding possibility to run build script from any folder.
Change-Id: I29e3a3de47def4a19d5656ee17efeb784984b7f0
Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
-rw-r--r-- | scripts/build-package.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/build-package.sh b/scripts/build-package.sh index 25fa73c8..700b5dc0 100644 --- a/scripts/build-package.sh +++ b/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"} @@ -213,7 +214,7 @@ build() { } # Build libdash -pushd ../libdash +pushd $SCRIPT_PATH/../libdash build make package sudo make install @@ -221,7 +222,7 @@ find . -not -name '*.deb' -not -name '*.rpm' -print0 | xargs -0 rm -rf -- || tru popd # Build viper -pushd .. +pushd $SCRIPT_PATH/.. build make package find . -not -name '*.deb' -not -name '*.rpm' -print0 | xargs -0 rm -rf -- || true |