Skip to content

Commit 2905ec4

Browse files
gustavodemoraisdawidwys
authored andcommitted
[FLINK-37176][docs] Support mac binary for setup_hugo
1 parent c065920 commit 2905ec4

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

docs/setup_hugo.sh

100644100755
+13-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,19 @@
1818
################################################################################
1919

2020
# setup hugo
21-
HUGO_REPO=https://github.com/gohugoio/hugo/releases/download/v0.110.0/hugo_extended_0.110.0_Linux-64bit.tar.gz
22-
HUGO_ARTIFACT=hugo_extended_0.110.0_Linux-64bit.tar.gz
21+
22+
# Detect Operating System
23+
OS="Linux"
24+
[[ "$OSTYPE" == "darwin"* ]] && OS="Mac"
25+
26+
# Setup Hugo based on OS
27+
if [ "$OS" = "Mac" ]; then
28+
HUGO_ARTIFACT="hugo_extended_0.110.0_darwin-universal.tar.gz"
29+
else
30+
HUGO_ARTIFACT="hugo_extended_0.110.0_Linux-64bit.tar.gz"
31+
fi
32+
33+
HUGO_REPO="https://github.com/gohugoio/hugo/releases/download/v0.110.0/${HUGO_ARTIFACT}"
2334
if ! curl --fail -OL $HUGO_REPO ; then
2435
echo "Failed to download Hugo binary"
2536
exit 1

0 commit comments

Comments
 (0)