musicbrainz-server/script/macos_compat.inc.sh
yvanzo 177f419c0f Amend 988e5eb910: Require GNU sed on macOS
On macOS, since the defaut BSD `sed` doesn’t have the option `-z`,
this snippet (already used in some other of our repositories too) is
requiring GNU `sed` to be installed as `gsed` and make use of it.
2024-06-27 16:52:49 +01:00

11 lines
215 B
Bash

if [[ $OSTYPE == darwin* ]]
then
if ! command -v gsed &> /dev/null
then
echo 'You must install gnu-sed (e.g. with Homebrew) to run this script.'
exit 1
fi
alias sed=gsed
shopt -s expand_aliases
fi