aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/oe-buildenv-internal
diff options
context:
space:
mode:
authorPeter Kjellerstedt <pkj@axis.com>2016-03-15 17:48:53 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-20 22:57:59 +0000
commit5b9e91a3b1d4f56c8646d7d7937ab453cc9c40a0 (patch)
tree1f9ef7856c48e72efcf26e7a55f6cf18ba0bbf09 /scripts/oe-buildenv-internal
parent40764c7039f1ee161916d4fbf7dfe15fb964030e (diff)
downloadopenembedded-core-contrib-5b9e91a3b1d4f56c8646d7d7937ab453cc9c40a0.tar.gz
oe-buildenv-internal: Add paths to $PATH individually
Instead of assuming that the path to the scripts directory always is in $PATH directly before the bitbake directory, treat them as separate paths and add them individually to $PATH. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts/oe-buildenv-internal')
-rwxr-xr-xscripts/oe-buildenv-internal11
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal
index 457763b7943..85f82f1b31c 100755
--- a/scripts/oe-buildenv-internal
+++ b/scripts/oe-buildenv-internal
@@ -95,9 +95,14 @@ if ! (test -d "$BITBAKEDIR"); then
fi
# Make sure our paths are at the beginning of $PATH
-NEWPATHS="${OEROOT}/scripts:$BITBAKEDIR/bin:"
-PATH=$NEWPATHS$(echo $PATH | sed -e "s|:$NEWPATHS|:|g" -e "s|^$NEWPATHS||")
-unset BITBAKEDIR NEWPATHS
+for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do
+ # Remove any existences of $newpath from $PATH
+ PATH=$(echo $PATH | sed -re "s#(^|:)$newpath(:|$)#\1#g;s#^:##")
+
+ # Add $newpath to $PATH
+ PATH="$newpath:$PATH"
+done
+unset BITBAKEDIR newpath
# Used by the runqemu script
export BUILDDIR