Skip to content

Force GNU sed on macOS #360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions generate-results.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

(
Expand Down