diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-01-08 12:53:31 +0100 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2013-01-08 13:18:33 +0100 |
commit | b6baa4cf3b81a55133cebba161fd105826989734 (patch) | |
tree | b78e980232538c469da38880d7683fd6798c78b4 | |
parent | 76bc50eefd9f003ca4a0562ec83f73edd8085610 (diff) |
Make bash script work
Bash functions need semicolons or newlines (common.sh) as separators.
When source-ing the script $0 will be /bin/bash, use $BASH_SOURCE instead.
Change-Id: I250a6caa12f48c0b05b9836be47514e914b218cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | scripts/common.sh | 4 | ||||
-rw-r--r-- | scripts/qtchooser.bash | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/scripts/common.sh b/scripts/common.sh index 946d26e..10071af 100644 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -85,7 +85,9 @@ function qt_select() fi } -function qt() { qt_select "$@" } +function qt() { + qt_select "$@" +} function qcd() { local dir="$1" diff --git a/scripts/qtchooser.bash b/scripts/qtchooser.bash index c445e6f..294e586 100644 --- a/scripts/qtchooser.bash +++ b/scripts/qtchooser.bash @@ -36,7 +36,8 @@ ## $QT_END_LICENSE$ ## -source ${0%/*}/common.sh + +source ${BASH_SOURCE%/*}/common.sh function qt_env_removefrom() { |