diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2013-04-05 18:59:45 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-04-09 13:16:52 +0100 |
commit | d852e0a409ba54c9cf8df39db2a0f316900e97bc (patch) | |
tree | 998fd1c51acc063e63b738ed5a0ee5396a9976b5 /scripts | |
parent | 2dd134ad0822ca7942024d55436d6f4681e835bc (diff) | |
download | poky-d852e0a409ba54c9cf8df39db2a0f316900e97bc.tar.gz |
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>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/oe-buildenv-internal | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal index 0a4d3243d1..df953896f1 100755 --- a/scripts/oe-buildenv-internal +++ b/scripts/oe-buildenv-internal | |||
@@ -74,8 +74,9 @@ if ! (test -d "$BITBAKEDIR"); then | |||
74 | return 1 | 74 | return 1 |
75 | fi | 75 | fi |
76 | 76 | ||
77 | PATH="${OEROOT}/scripts:$BITBAKEDIR/bin/:$PATH" | 77 | NEWPATHS="${OEROOT}/scripts:$BITBAKEDIR/bin/:" |
78 | unset BITBAKEDIR | 78 | [ "${PATH#$NEWPATHS}" != "$PATH" ] || PATH="$NEWPATHS$PATH" |
79 | unset BITBAKEDIR NEWPATHS | ||
79 | 80 | ||
80 | # Used by the runqemu script | 81 | # Used by the runqemu script |
81 | export BUILDDIR | 82 | export BUILDDIR |