Skip to content

Commit 6cded7e

Browse files
Marcus SorensenMarcus Sorensen
andauthored
Support GNU sed apidoc for MacOS build (#7888)
Co-authored-by: Marcus Sorensen <mls@apple.com>
1 parent 6d24217 commit 6cded7e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tools/apidoc/build-apidoc.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,12 @@ fi
5959
# Default case for Linux sed, just use "-i"
6060
sedi='-i'
6161
case "$(uname)" in
62-
# For macOS, use two parameters
63-
Darwin*) sedi='-i ""'
62+
# For macOS, use two parameters, if gnu sed is not set up
63+
Darwin*)
64+
if ! $(which sed | grep -q gnu); then
65+
sedi='-i ""'
66+
fi
67+
;;
6468
esac
6569

6670
set -e

0 commit comments

Comments
 (0)