1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

chore(build): fix version script failure when called from non-base dir

Now script will work regardless of the working directory it was called
from.

This fixes problem with CMake failing when it's called from directory
other than base `qTox`.

Fix from
https://stackoverflow.com/questions/59895/getting-the-source-directory-of-a-bash-script-from-within
This commit is contained in:
Zetok Zalbavar 2017-02-23 08:47:46 +00:00
parent 63ace85913
commit a2aaff115c
No known key found for this signature in database
GPG Key ID: C953D3880212068A

View File

@ -34,14 +34,16 @@
set -eu -o pipefail set -eu -o pipefail
readonly SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
readonly BASE_DIR="$SCRIPT_DIR/../"
update_windows() { update_windows() {
( cd windows ( cd "$BASE_DIR/windows"
./qtox-nsi-version.sh "$@" ) ./qtox-nsi-version.sh "$@" )
} }
update_osx() { update_osx() {
( cd osx ( cd "$BASE_DIR/osx"
./update-plist-version.sh "$@" ) ./update-plist-version.sh "$@" )
} }