mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-23 21:15:14 +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
Notes:
sideshowbarker
2024-07-17 17:42:19 +09:00
Author: https://github.com/BertalanD Commit: https://github.com/SerenityOS/serenity/commit/aed2e214b6 Pull-request: https://github.com/SerenityOS/serenity/pull/12886 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/linusg ✅
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue