diff --git a/docs/setup_hugo.sh b/docs/setup_hugo.sh old mode 100644 new mode 100755 index 5f3fa290284..0abd54fcb56 --- a/docs/setup_hugo.sh +++ b/docs/setup_hugo.sh @@ -18,8 +18,19 @@ ################################################################################ # setup hugo -HUGO_REPO=https://github.com/gohugoio/hugo/releases/download/v0.110.0/hugo_extended_0.110.0_Linux-64bit.tar.gz -HUGO_ARTIFACT=hugo_extended_0.110.0_Linux-64bit.tar.gz + +# Detect Operating System +OS="Linux" +[[ "$OSTYPE" == "darwin"* ]] && OS="Mac" + +# Setup Hugo based on OS +if [ "$OS" = "Mac" ]; then + HUGO_ARTIFACT="hugo_extended_0.110.0_darwin-universal.tar.gz" +else + HUGO_ARTIFACT="hugo_extended_0.110.0_Linux-64bit.tar.gz" +fi + +HUGO_REPO="https://github.com/gohugoio/hugo/releases/download/v0.110.0/${HUGO_ARTIFACT}" if ! curl --fail -OL $HUGO_REPO ; then echo "Failed to download Hugo binary" exit 1