summaryrefslogtreecommitdiffstats
path: root/scripts/oe-buildenv-internal
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/oe-buildenv-internal')
-rwxr-xr-xscripts/oe-buildenv-internal13
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal
index c13fc40f8b..117b0c593e 100755
--- a/scripts/oe-buildenv-internal
+++ b/scripts/oe-buildenv-internal
@@ -21,7 +21,7 @@
21# It is assumed OEROOT is already defined when this is called 21# It is assumed OEROOT is already defined when this is called
22if [ -z "$OEROOT" ]; then 22if [ -z "$OEROOT" ]; then
23 echo >&2 "Error: OEROOT is not defined!" 23 echo >&2 "Error: OEROOT is not defined!"
24 return 24 return 1
25fi 25fi
26 26
27if [ "x$BDIR" = "x" ]; then 27if [ "x$BDIR" = "x" ]; then
@@ -29,6 +29,15 @@ if [ "x$BDIR" = "x" ]; then
29 BDIR="build" 29 BDIR="build"
30 else 30 else
31 BDIR=`readlink -f "$1"` 31 BDIR=`readlink -f "$1"`
32 if [ -z "$BDIR" ]; then
33 if expr "$1" : '.*/$' >/dev/null; then
34 echo >&2 "Error: please remove any trailing / in the argument."
35 else
36 PARENTDIR=`dirname "$1"`
37 echo >&2 "Error: the directory $PARENTDIR doesn't exist?"
38 fi
39 return 1
40 fi
32 fi 41 fi
33fi 42fi
34if expr "$BDIR" : '/.*' > /dev/null ; then 43if expr "$BDIR" : '/.*' > /dev/null ; then
@@ -45,7 +54,7 @@ BUILDDIR=`readlink -f "$BUILDDIR"`
45 54
46if ! (test -d "$BITBAKEDIR"); then 55if ! (test -d "$BITBAKEDIR"); then
47 echo >&2 "Error: The bitbake directory ($BITBAKEDIR) does not exist! Please ensure a copy of bitbake exists at this location" 56 echo >&2 "Error: The bitbake directory ($BITBAKEDIR) does not exist! Please ensure a copy of bitbake exists at this location"
48 return 57 return 1
49fi 58fi
50 59
51PATH="${OEROOT}/scripts:$BITBAKEDIR/bin/:$PATH" 60PATH="${OEROOT}/scripts:$BITBAKEDIR/bin/:$PATH"