]> code.ossystems Code Review - openembedded-core.git/commitdiff
oe-buildenv-internal: Correct the sed expression which updates $PATH
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Mon, 21 Mar 2016 11:41:46 +0000 (12:41 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 21 Mar 2016 11:57:27 +0000 (11:57 +0000)
Without this, the code that adds paths to $PATH could cause it to end
up with a trailing : which would then cause an error from the sanity
checker.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/oe-buildenv-internal

index bc6a4fedcdd12105249b3a9e61f56d0d66698c22..8eee0087a9806aa3bbec66a6fac9853393f79bfd 100755 (executable)
@@ -99,7 +99,7 @@ fi
 # Make sure our paths are at the beginning of $PATH
 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#^:##")
+    PATH=$(echo $PATH | sed -re "s#(^|:)$newpath(:|$)#\2#g;s#^:##")
 
     # Add $newpath to $PATH
     PATH="$newpath:$PATH"