diff options
author | Mauro Sardara <msardara+fdio@cisco.com> | 2017-04-19 17:06:00 +0200 |
---|---|---|
committer | Mauro Sardara <msardara+fdio@cisco.com> | 2017-04-19 15:07:38 +0000 |
commit | 90810dee44fec032a253a379bdd46e1198274fff (patch) | |
tree | 845c4a0b43cff0b2eca325d3d156f2d600cfacc7 | |
parent | b68074b143fb9f97200695473b841fe77fbf8cf8 (diff) |
Adding possibility to run building script from any folder.
Change-Id: If11d6d28473c8628d3fc4a03ac90964d1fc0f923
Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
-rw-r--r-- | libparc/scripts/build-package.sh | 5 | ||||
-rw-r--r-- | longbow/scripts/build-package.sh | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/libparc/scripts/build-package.sh b/libparc/scripts/build-package.sh index 846713ee..0f0b8daa 100644 --- a/libparc/scripts/build-package.sh +++ b/libparc/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 .. @@ -215,6 +216,6 @@ build_package() { PACKAGE_NAME="LIBPARC" PACKAGE_DEPS="LIBPARC_DEPS" -pushd .. +pushd $SCRIPT_PATH/.. build_package $PACKAGE_NAME popd diff --git a/longbow/scripts/build-package.sh b/longbow/scripts/build-package.sh index 3bd0ff42..a7078e0a 100644 --- a/longbow/scripts/build-package.sh +++ b/longbow/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="LONGBOW" -pushd .. +pushd $SCRIPT_PATH/.. build_package $PACKAGE_NAME popd
\ No newline at end of file |