Fix update.sh for use on BSD/Darwin
authorPablo Zmdl <redacted>
Wed, 20 Nov 2024 16:15:39 +0000 (17:15 +0100)
committerPablo Zmdl <redacted>
Wed, 20 Nov 2024 16:16:52 +0000 (17:16 +0100)
BSD vs. GNU sed have incompatible argument syntax for editing files
in-place.
We now simply use good old perl, instead of ugly workarounds.

update.sh

index 05b6b8faa5d7451a8f6a479b3e02c015d61b2922..1887cbb78b91fbf6538d9665a968775faeda749b 100755 (executable)
--- a/update.sh
+++ b/update.sh
@@ -34,7 +34,9 @@ for variant in apache fpm fpm-alpine; do
        echo "✓ Wrote $dir/Dockerfile"
 done
 
-sed -i -E "s/1\.[0-9]\.[0-9]+-/${VERSION}-/" .github/workflows/build.yml
+# Use perl to avoid problems with BSD vs. GNU sed, which have incompatible
+# argument syntax for editing files in-place.
+perl -pi -e "s/1\.[0-9]\.[0-9]+-/${VERSION}-/" .github/workflows/build.yml
 echo "Updating version in build.yml workflow"
 
 echo "Done."
git clone https://git.99rst.org/PROJECT