Avoid training :'s in paths

When the path was empty, path_push_unique would cause a training colon
to be added.  This was a known issue that didn't cause any harm, but
while we're here, we'll clean this up.
This commit is contained in:
Travis Cross 2014-05-05 21:38:52 +00:00
parent aef982dd09
commit 0a56e643b1
1 changed files with 5 additions and 1 deletions

View File

@ -607,7 +607,11 @@ path_remove () {
path_push_unique () {
x="$(eval echo \$$1)"
x="$(path_remove "$x" "$2")"
eval export $1="$2:$x"
if test -z "$x"; then
eval export $1="$2"
else
eval export $1="$2:$x"
fi
}
# tweak platform specific flags