diff options
author | Peter Kjellerstedt <pkj@axis.com> | 2016-03-15 17:48:53 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-20 23:12:30 +0000 |
commit | 39ac332f660dbbf7d3e05e505c02fce1aaccdf9e (patch) | |
tree | 47888feafc41529812bceee01aa5aed8ee7dd238 /scripts | |
parent | dd5f2f7275a2f36e9dd8979fbdf1e367ad579147 (diff) | |
download | poky-39ac332f660dbbf7d3e05e505c02fce1aaccdf9e.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.
(From OE-Core rev: 5b9e91a3b1d4f56c8646d7d7937ab453cc9c40a0)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-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 |