summaryrefslogtreecommitdiffstats
path: root/scripts/oe-buildenv-internal
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-12 08:41:44 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-12 08:43:15 +0100
commit8da9bbfc439ea1b578bff747fd0d7c26573265f5 (patch)
tree67b50175aad5af40bbf0c024f6e6e42c57db38f2 /scripts/oe-buildenv-internal
parente63b1791cddcc3cc50df59a4aeeab1b3a200b48c (diff)
downloadpoky-8da9bbfc439ea1b578bff747fd0d7c26573265f5.tar.gz
oe-buildenv-internal: Fix BITBAKEDIR changes to work with existing autobuilder scritpts
The BITBAKEDIR change does not work well when the script is sourced from another script since $2 may be unrelated. This change adds the logic onto the BDIR conditional and which more external scripts would set, hence avoiding the problem. (From OE-Core rev: ec8fbe0d1870285a4a972ddcfe83aa63d720cb80) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/oe-buildenv-internal')
-rwxr-xr-xscripts/oe-buildenv-internal7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal
index 05c6cd8ce1..32c0ba02d6 100755
--- a/scripts/oe-buildenv-internal
+++ b/scripts/oe-buildenv-internal
@@ -46,6 +46,9 @@ if [ "x$BDIR" = "x" ]; then
46 return 1 46 return 1
47 fi 47 fi
48 fi 48 fi
49 if [ "x$2" != "x" ]; then
50 BITBAKEDIR="$2"
51 fi
49fi 52fi
50if expr "$BDIR" : '/.*' > /dev/null ; then 53if expr "$BDIR" : '/.*' > /dev/null ; then
51 BUILDDIR="$BDIR" 54 BUILDDIR="$BDIR"
@@ -54,10 +57,8 @@ else
54fi 57fi
55unset BDIR 58unset BDIR
56 59
57if [ "x$2" = "x" ]; then 60if [ "x$BITBAKEDIR" = "x" ]; then
58 BITBAKEDIR="$OEROOT/bitbake$BBEXTRA/" 61 BITBAKEDIR="$OEROOT/bitbake$BBEXTRA/"
59else
60 BITBAKEDIR="$2"
61fi 62fi
62 63
63BITBAKEDIR=`readlink -f "$BITBAKEDIR"` 64BITBAKEDIR=`readlink -f "$BITBAKEDIR"`