summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2013-04-05 18:59:45 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-09 13:16:52 +0100
commitd852e0a409ba54c9cf8df39db2a0f316900e97bc (patch)
tree998fd1c51acc063e63b738ed5a0ee5396a9976b5
parent2dd134ad0822ca7942024d55436d6f4681e835bc (diff)
downloadpoky-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>
-rwxr-xr-xscripts/oe-buildenv-internal5
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
75fi 75fi
76 76
77PATH="${OEROOT}/scripts:$BITBAKEDIR/bin/:$PATH" 77NEWPATHS="${OEROOT}/scripts:$BITBAKEDIR/bin/:"
78unset BITBAKEDIR 78[ "${PATH#$NEWPATHS}" != "$PATH" ] || PATH="$NEWPATHS$PATH"
79unset BITBAKEDIR NEWPATHS
79 80
80# Used by the runqemu script 81# Used by the runqemu script
81export BUILDDIR 82export BUILDDIR