mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
Ports: Replace run_command use in bash with a run_replace_in_file helper
This way, we don't (in the ports themselves) depend on perl as a public interface, which means if we ever have to, we can port to something else easier.
This commit is contained in:
parent
2b1a52745e
commit
335d0e52a4
Notes:
sideshowbarker
2024-07-19 13:52:38 +09:00
Author: https://github.com/rburchell Commit: https://github.com/SerenityOS/serenity/commit/335d0e52a4a Pull-request: https://github.com/SerenityOS/serenity/pull/132 Reviewed-by: https://github.com/awesomekling
2 changed files with 6 additions and 2 deletions
|
@ -40,6 +40,10 @@ function run_fetch_git() {
|
|||
fi
|
||||
}
|
||||
|
||||
function run_replace_in_file() {
|
||||
run_command perl -p -i -e "$1" $2
|
||||
}
|
||||
|
||||
function run_patch() {
|
||||
echo "+ Applying patch $1"
|
||||
run_command patch "$2" < "$1"
|
||||
|
|
|
@ -18,8 +18,8 @@ function configure() {
|
|||
}
|
||||
function build() {
|
||||
# Avoid some broken cross compile tests...
|
||||
run_command perl -p -i -e "s/define GETCWD_BROKEN 1/undef GETCWD_BROKEN/" config.h
|
||||
run_command perl -p -i -e "s/define CAN_REDEFINE_GETENV 1/undef CAN_REDEFINE_GETENV/" config.h
|
||||
run_replace_in_file "s/define GETCWD_BROKEN 1/undef GETCWD_BROKEN/" config.h
|
||||
run_replace_in_file "s/define CAN_REDEFINE_GETENV 1/undef CAN_REDEFINE_GETENV/" config.h
|
||||
run_make
|
||||
}
|
||||
function install() {
|
||||
|
|
Loading…
Reference in a new issue