mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:47:35 +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
1 changed files with 5 additions and 1 deletions
|
@ -108,7 +108,11 @@ run() {
|
||||||
}
|
}
|
||||||
|
|
||||||
run_replace_in_file() {
|
run_replace_in_file() {
|
||||||
|
if [ "$(uname -s)" = "SerenityOS" ]; then
|
||||||
|
run sed -i "$1" $2
|
||||||
|
else
|
||||||
run perl -p -i -e "$1" $2
|
run perl -p -i -e "$1" $2
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
get_new_config_sub() {
|
get_new_config_sub() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue