]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Avoid training :'s in paths
authorTravis Cross <tc@traviscross.com>
Mon, 5 May 2014 21:38:52 +0000 (21:38 +0000)
committerTravis Cross <tc@traviscross.com>
Mon, 5 May 2014 21:39:51 +0000 (21:39 +0000)
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.

configure.ac

index 39e8063276d555cad379aba286a1c9804747c8aa..10087e3b0b3bfb197ae8670c888f06e282126984 100644 (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