diff --git a/tools/mac_setup.sh b/tools/mac_setup.sh index 0b81f86fb1..c917d77f30 100755 --- a/tools/mac_setup.sh +++ b/tools/mac_setup.sh @@ -1,7 +1,13 @@ #!/bin/bash -e -echo "Updating Homebrew" -brew update +# Install brew if required. +if [[ $(command -v brew) == "" ]]; then + echo "Installing Hombrew" + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" +else + echo "Updating Homebrew" + brew update || true +fi brew install capnp \ czmq \