From: Travis Cross Date: Mon, 5 May 2014 21:26:34 +0000 (+0000) Subject: Work around Mac's broken sed X-Git-Tag: v1.5.12~38^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aef982dd09664e70cf77d1d8df51eead3bbd7d14;p=thirdparty%2Ffreeswitch.git Work around Mac's broken sed 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. --- diff --git a/configure.ac b/configure.ac index e1ba8b502e..39e8063276 100644 --- a/configure.ac +++ b/configure.ac @@ -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)"