diff options
Diffstat (limited to 'scripts/oe-buildenv-internal')
-rwxr-xr-x | scripts/oe-buildenv-internal | 13 |
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 |
22 | if [ -z "$OEROOT" ]; then | 22 | if [ -z "$OEROOT" ]; then |
23 | echo >&2 "Error: OEROOT is not defined!" | 23 | echo >&2 "Error: OEROOT is not defined!" |
24 | return | 24 | return 1 |
25 | fi | 25 | fi |
26 | 26 | ||
27 | if [ "x$BDIR" = "x" ]; then | 27 | if [ "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 |
33 | fi | 42 | fi |
34 | if expr "$BDIR" : '/.*' > /dev/null ; then | 43 | if expr "$BDIR" : '/.*' > /dev/null ; then |
@@ -45,7 +54,7 @@ BUILDDIR=`readlink -f "$BUILDDIR"` | |||
45 | 54 | ||
46 | if ! (test -d "$BITBAKEDIR"); then | 55 | if ! (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 |
49 | fi | 58 | fi |
50 | 59 | ||
51 | PATH="${OEROOT}/scripts:$BITBAKEDIR/bin/:$PATH" | 60 | PATH="${OEROOT}/scripts:$BITBAKEDIR/bin/:$PATH" |