mirror of
https://github.com/RGBCube/serenity
synced 2025-07-29 22:07:35 +00:00
Ports: Make sed
work on macOS
The ports `libvorbis`, `readline` and `timidity` would not install on macOS as a result of using `sed -i` without an extension provided. GNU sed is available through Homebrew, but it does not replace `sed` by default. Instead, provide a new `sed_in_place` function that calls `sed` with the right arguments.
This commit is contained in:
parent
3110f5b328
commit
7c2976e006
4 changed files with 11 additions and 3 deletions
|
@ -142,6 +142,14 @@ run_replace_in_file() {
|
|||
fi
|
||||
}
|
||||
|
||||
sed_in_place() {
|
||||
if [ "$(uname -s)" = "Darwin" ]; then
|
||||
sed -i '' "${@}"
|
||||
else
|
||||
sed -i "${@}"
|
||||
fi
|
||||
}
|
||||
|
||||
get_new_config_sub() {
|
||||
config_sub="${1:-config.sub}"
|
||||
if [ ! -f "$workdir/$config_sub" ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue