diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-12 08:41:44 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-12 08:41:50 +0100 |
commit | ec8fbe0d1870285a4a972ddcfe83aa63d720cb80 (patch) | |
tree | ca8bdaf245a6a4279580e717739e4e3370a9caf0 /scripts/oe-buildenv-internal | |
parent | 8a11f42d3ed526fae0c0bb050d7d0519904591b4 (diff) | |
download | openembedded-core-ec8fbe0d1870285a4a972ddcfe83aa63d720cb80.tar.gz openembedded-core-ec8fbe0d1870285a4a972ddcfe83aa63d720cb80.tar.bz2 openembedded-core-ec8fbe0d1870285a4a972ddcfe83aa63d720cb80.zip |
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/oe-buildenv-internal')
-rwxr-xr-x | scripts/oe-buildenv-internal | 7 |
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 return 1 fi fi + if [ "x$2" != "x" ]; then + BITBAKEDIR="$2" + fi fi if expr "$BDIR" : '/.*' > /dev/null ; then BUILDDIR="$BDIR" @@ -54,10 +57,8 @@ else fi unset BDIR -if [ "x$2" = "x" ]; then +if [ "x$BITBAKEDIR" = "x" ]; then BITBAKEDIR="$OEROOT/bitbake$BBEXTRA/" -else - BITBAKEDIR="$2" fi BITBAKEDIR=`readlink -f "$BITBAKEDIR"` |