mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02:00
oe-buildenv-internal: Only add to $PATH if needed
If $PATH already has the needed paths at the beginning, there is no need to add them again. This allows rerunning oe-init-build-env for the same directory without having $PATH increase unnecessarily every time. (From OE-Core rev: 161abcd3672f83990ede03d67b7388678c07150e) Signed-off-by: Peter Kjellerstedt <pkj@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
2dd134ad08
commit
d852e0a409
|
@ -74,8 +74,9 @@ if ! (test -d "$BITBAKEDIR"); then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PATH="${OEROOT}/scripts:$BITBAKEDIR/bin/:$PATH"
|
NEWPATHS="${OEROOT}/scripts:$BITBAKEDIR/bin/:"
|
||||||
unset BITBAKEDIR
|
[ "${PATH#$NEWPATHS}" != "$PATH" ] || PATH="$NEWPATHS$PATH"
|
||||||
|
unset BITBAKEDIR NEWPATHS
|
||||||
|
|
||||||
# Used by the runqemu script
|
# Used by the runqemu script
|
||||||
export BUILDDIR
|
export BUILDDIR
|
||||||
|
|
Loading…
Reference in New Issue
Block a user