From b4917d7902a513e35d8cbfad12348cf3d8037a4c Mon Sep 17 00:00:00 2001 From: Craig Watson Date: Thu, 21 Apr 2016 09:44:04 +0200 Subject: [PATCH] correct detection of current working directory in build scripts --- release_scripts/linux/build.sh | 3 ++- release_scripts/linux/package.sh | 2 +- release_scripts/osx/release.macx.sh | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/release_scripts/linux/build.sh b/release_scripts/linux/build.sh index 81ab8780..a196d836 100755 --- a/release_scripts/linux/build.sh +++ b/release_scripts/linux/build.sh @@ -20,7 +20,8 @@ initializeVariables() STANDARD_QT_USED=false # Root directory - PROJECT_ROOT="`pwd`/../.." + SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + PROJECT_ROOT="$SCRIPT_PATH/../.." BUILD_DIR="$PROJECT_ROOT/build/linux/release" PRODUCT_PATH="$BUILD_DIR/product" diff --git a/release_scripts/linux/package.sh b/release_scripts/linux/package.sh index 8a9fc2b8..b2246ca0 100755 --- a/release_scripts/linux/package.sh +++ b/release_scripts/linux/package.sh @@ -107,7 +107,7 @@ copyQtPlugin(){ initializeVariables() { # This script's path - SCRIPT_PATH=`pwd` + SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" PROJECT_ROOT="$SCRIPT_PATH/../.." diff --git a/release_scripts/osx/release.macx.sh b/release_scripts/osx/release.macx.sh index 4d0b1ea3..2dd65a3d 100755 --- a/release_scripts/osx/release.macx.sh +++ b/release_scripts/osx/release.macx.sh @@ -14,7 +14,7 @@ # along with this program. If not, see . # --------------------------------------------------------------------- -SCRIPT_PATH="`pwd`" +SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" PROJECT_ROOT="$SCRIPT_PATH/../.."