From cde3bea90ad3eb4579c3cd09cd35cc7ea8294d00 Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Sun, 4 May 2025 22:15:25 +0200 Subject: [PATCH 1/2] Force GNU sed on macOS --- generate-results.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/generate-results.sh b/generate-results.sh index b0894d1e8..d5f14a34a 100755 --- a/generate-results.sh +++ b/generate-results.sh @@ -5,8 +5,11 @@ # This is needed on Mac OS. Do `brew install coreutils`. [ -n "$HOMEBREW_PREFIX" ] && PATH="${HOMEBREW_PREFIX}/opt/coreutils/libexec/gnubin:${PATH}" -if command -v gsed >/dev/null 2>&1 +if ! command -v gsed >/dev/null 2>&1 then + echo "On macOS, please install GNU sed through homebrew." + exit 1 +else shopt -s expand_aliases alias sed='gsed' fi From 03022b53bd3e139f89b99649f759e22c080d800e Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Sun, 4 May 2025 20:18:39 +0000 Subject: [PATCH 2/2] Fix --- generate-results.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/generate-results.sh b/generate-results.sh index d5f14a34a..001086e05 100755 --- a/generate-results.sh +++ b/generate-results.sh @@ -4,14 +4,15 @@ # Note: editing HTML with sed may look strange, but at least we avoid using node.js and npm, and that's good. # This is needed on Mac OS. Do `brew install coreutils`. -[ -n "$HOMEBREW_PREFIX" ] && PATH="${HOMEBREW_PREFIX}/opt/coreutils/libexec/gnubin:${PATH}" -if ! command -v gsed >/dev/null 2>&1 -then +if [[ "$(uname)" == "Darwin" ]]; then + if ! command -v gsed >/dev/null 2>&1 + then echo "On macOS, please install GNU sed through homebrew." exit 1 -else + else shopt -s expand_aliases alias sed='gsed' + fi fi (