diff options
Diffstat (limited to 'oe-init-build-env')
-rwxr-xr-x | oe-init-build-env | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/oe-init-build-env b/oe-init-build-env index e813230a98..861c3e000e 100755 --- a/oe-init-build-env +++ b/oe-init-build-env | |||
@@ -31,13 +31,18 @@ elif [ -n "$ZSH_NAME" ]; then | |||
31 | THIS_SCRIPT=$0 | 31 | THIS_SCRIPT=$0 |
32 | else | 32 | else |
33 | THIS_SCRIPT="$(pwd)/oe-init-build-env" | 33 | THIS_SCRIPT="$(pwd)/oe-init-build-env" |
34 | if [ ! -e "$THIS_SCRIPT" ]; then | ||
35 | echo "Error: $THIS_SCRIPT doesn't exist!" >&2 | ||
36 | echo "Please run this script in oe-init-build-env's directory." >&2 | ||
37 | exit 1 | ||
38 | fi | ||
34 | fi | 39 | fi |
35 | if [ -n "$BBSERVER" ]; then | 40 | if [ -n "$BBSERVER" ]; then |
36 | unset BBSERVER | 41 | unset BBSERVER |
37 | fi | 42 | fi |
38 | 43 | ||
39 | if [ -z "$ZSH_NAME" ] && [ "$0" = "$THIS_SCRIPT" ]; then | 44 | if [ -z "$ZSH_NAME" ] && [ "$0" = "$THIS_SCRIPT" ]; then |
40 | echo "Error: This script needs to be sourced. Please run as '. $THIS_SCRIPT'" | 45 | echo "Error: This script needs to be sourced. Please run as '. $THIS_SCRIPT'" >&2 |
41 | exit 1 | 46 | exit 1 |
42 | fi | 47 | fi |
43 | 48 | ||