diff options
Diffstat (limited to 'scripts/oe-buildenv-internal')
-rwxr-xr-x | scripts/oe-buildenv-internal | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal index 457763b794..85f82f1b31 100755 --- a/scripts/oe-buildenv-internal +++ b/scripts/oe-buildenv-internal | |||
@@ -95,9 +95,14 @@ if ! (test -d "$BITBAKEDIR"); then | |||
95 | fi | 95 | fi |
96 | 96 | ||
97 | # Make sure our paths are at the beginning of $PATH | 97 | # Make sure our paths are at the beginning of $PATH |
98 | NEWPATHS="${OEROOT}/scripts:$BITBAKEDIR/bin:" | 98 | for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do |
99 | PATH=$NEWPATHS$(echo $PATH | sed -e "s|:$NEWPATHS|:|g" -e "s|^$NEWPATHS||") | 99 | # Remove any existences of $newpath from $PATH |
100 | unset BITBAKEDIR NEWPATHS | 100 | PATH=$(echo $PATH | sed -re "s#(^|:)$newpath(:|$)#\1#g;s#^:##") |
101 | |||
102 | # Add $newpath to $PATH | ||
103 | PATH="$newpath:$PATH" | ||
104 | done | ||
105 | unset BITBAKEDIR newpath | ||
101 | 106 | ||
102 | # Used by the runqemu script | 107 | # Used by the runqemu script |
103 | export BUILDDIR | 108 | export BUILDDIR |