]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Work around Mac's broken sed
authorTravis Cross <tc@traviscross.com>
Mon, 5 May 2014 21:26:34 +0000 (21:26 +0000)
committerTravis Cross <tc@traviscross.com>
Mon, 5 May 2014 21:32:30 +0000 (21:32 +0000)
sed on Mac is apparently incredibly broken and incapable of adding
newlines.  `printf 'x' | sed 's/x/\n/'` results in 'n' on Mac rather
than a newline.  GNU sed even in --posix mode does not agree with this
behavior.  None the less, we can work around it here.

configure.ac

index e1ba8b502e0acc00affba80110154d480e962cfb..39e8063276d555cad379aba286a1c9804747c8aa 100644 (file)
@@ -602,7 +602,7 @@ PLATFORM_CORE_LDFLAGS=
 PLATFORM_CORE_LIBS=
 
 path_remove () {
-  echo "$1" | sed 's/:/\n/g' | grep -Fxv "$2" | tr '\n' ':' | sed 's/:$/\n/'
+  echo "$1" | tr ':' '\n' | grep -Fxv "$2" | tr '\n' ':' | sed 's/:$//'
 }
 path_push_unique () {
   x="$(eval echo \$$1)"