mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-02 22:24:26 +00:00
Ports: Use sed -i
for run_replace_in_file on Serenity hosts
We don't have a perl port, so let's use GNU sed's in-place option for doing substitutions when running inside Serenity. Note that we can't do this unconditionally, as `sed -i` is not portable and works differently on BSD systems.
This commit is contained in:
parent
ea52ba9fdc
commit
aed2e214b6
|
@ -108,7 +108,11 @@ run() {
|
|||
}
|
||||
|
||||
run_replace_in_file() {
|
||||
run perl -p -i -e "$1" $2
|
||||
if [ "$(uname -s)" = "SerenityOS" ]; then
|
||||
run sed -i "$1" $2
|
||||
else
|
||||
run perl -p -i -e "$1" $2
|
||||
fi
|
||||
}
|
||||
|
||||
get_new_config_sub() {
|
||||
|
|
Loading…
Reference in a new issue