summaryrefslogtreecommitdiff
path: root/Ports/.port_include.sh
diff options
context:
space:
mode:
authorRobin Burchell <robin+git@viroteck.net>2019-05-28 10:25:39 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-05-28 11:03:18 +0200
commit335d0e52a4a31fddca0f5d3220598bde95ca06f1 (patch)
tree64e865fb19d45faa1fb0027058280fb659f1dba6 /Ports/.port_include.sh
parent2b1a52745e136b22cde59ac8a75f7f3d1115abf6 (diff)
downloadserenity-335d0e52a4a31fddca0f5d3220598bde95ca06f1.zip
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.
Diffstat (limited to 'Ports/.port_include.sh')
-rwxr-xr-xPorts/.port_include.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh
index e516cce05a..1a5de96130 100755
--- a/Ports/.port_include.sh
+++ b/Ports/.port_include.sh
@@ -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"