diff options
author | Jake Petroules <jake.petroules@theqtcompany.com> | 2016-03-29 12:40:14 -0700 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@theqtcompany.com> | 2016-04-08 06:06:17 +0000 |
commit | 04d4e351cde51a61e9ceaeb0265c1d4b8677b6ca (patch) | |
tree | 7f9aeb71d4d6432b3293ac7bfa04ac398b4ad677 | |
parent | 3fc7fbeb76fb97ceae6763e6dccebbaa9c14c5f4 (diff) | |
download | meta-boot2qt-04d4e351cde51a61e9ceaeb0265c1d4b8677b6ca.tar.gz |
setup-environment: prevent basename argument being parsed as option.
This fixes an issue where this script fails with the default Dash shell
on Ubuntu (where "$0" is "-bash" and it is parsed as an option).
Change-Id: I6fec2a7b4e8eee68b5f11101783d7dff7d07f712
Reviewed-by: Donald Carr <donald.carr@theqtcompany.com>
Reviewed-by: Risto Avila <risto.avila@theqtcompany.com>
Reviewed-by: Samuli Piippo <samuli.piippo@theqtcompany.com>
-rwxr-xr-x | scripts/setup-environment.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/setup-environment.sh b/scripts/setup-environment.sh index 28adeec..566b708 100755 --- a/scripts/setup-environment.sh +++ b/scripts/setup-environment.sh | |||
@@ -34,7 +34,7 @@ while test -n "$1"; do | |||
34 | done | 34 | done |
35 | 35 | ||
36 | THIS_SCRIPT="setup-environment.sh" | 36 | THIS_SCRIPT="setup-environment.sh" |
37 | if [ "$(basename $0)" = "${THIS_SCRIPT}" ]; then | 37 | if [ "$(basename -- $0)" = "${THIS_SCRIPT}" ]; then |
38 | echo "Error: This script needs to be sourced. Please run as '. $0'" | 38 | echo "Error: This script needs to be sourced. Please run as '. $0'" |
39 | exit 1 | 39 | exit 1 |
40 | fi | 40 | fi |