From b066013a813f1bd44955b2bd3039465cf9b4204e Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Sun, 4 May 2025 20:25:06 +0000 Subject: [PATCH] sed --- generate-results.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/generate-results.sh b/generate-results.sh index ba85ffd..0484955 100755 --- a/generate-results.sh +++ b/generate-results.sh @@ -4,11 +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 shopt -s expand_aliases alias sed='gsed' + fi fi (