mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-13 04:57:05 +00:00
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.
This commit is contained in:
1 parent
29ea8e9979
commit
aef982dd09
1 file changed
+1
-1
+1
-1
@@ -602,7 +602,7 @@ PLATFORM_CORE_LDFLAGS=
|
|||||||
PLATFORM_CORE_LIBS=
|
PLATFORM_CORE_LIBS=
|
||||||
|
|
||||||
path_remove () {
|
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 () {
|
path_push_unique () {
|
||||||
x="$(eval echo \$$1)"
|
x="$(eval echo \$$1)"
|
||||||
|
|||||||
Reference in new issue
Block a user