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>
This commit is contained in:
parent
e63b1791cd
commit
8da9bbfc43
|
@ -46,6 +46,9 @@ if [ "x$BDIR" = "x" ]; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if [ "x$2" != "x" ]; then
|
||||||
|
BITBAKEDIR="$2"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if expr "$BDIR" : '/.*' > /dev/null ; then
|
if expr "$BDIR" : '/.*' > /dev/null ; then
|
||||||
BUILDDIR="$BDIR"
|
BUILDDIR="$BDIR"
|
||||||
|
@ -54,10 +57,8 @@ else
|
||||||
fi
|
fi
|
||||||
unset BDIR
|
unset BDIR
|
||||||
|
|
||||||
if [ "x$2" = "x" ]; then
|
if [ "x$BITBAKEDIR" = "x" ]; then
|
||||||
BITBAKEDIR="$OEROOT/bitbake$BBEXTRA/"
|
BITBAKEDIR="$OEROOT/bitbake$BBEXTRA/"
|
||||||
else
|
|
||||||
BITBAKEDIR="$2"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BITBAKEDIR=`readlink -f "$BITBAKEDIR"`
|
BITBAKEDIR=`readlink -f "$BITBAKEDIR"`
|
||||||
|
|
Loading…
Reference in New Issue