diff --git a/android.sh b/android.sh index a646696b9..d980e8a57 100755 --- a/android.sh +++ b/android.sh @@ -10,7 +10,7 @@ while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & # Check for Homebrew, # Install if we don't have it -if test ! $(which brew); then +if ! command -v brew >/dev/null 2>&1; then echo "Installing homebrew..." ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" fi diff --git a/datastores.sh b/datastores.sh index bc6fb882e..1fe78f372 100755 --- a/datastores.sh +++ b/datastores.sh @@ -10,7 +10,7 @@ while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & # Check for Homebrew, # Install if we don't have it -if test ! $(which brew); then +if ! command -v brew >/dev/null 2>&1; then echo "Installing homebrew..." ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" fi @@ -31,4 +31,4 @@ brew install caskroom/cask/brew-cask brew cask install --appdir="/Applications" mysqlworkbench # Remove outdated versions from the cellar. -brew cleanup \ No newline at end of file +brew cleanup diff --git a/web.sh b/web.sh index dee44602c..b741fb2f3 100755 --- a/web.sh +++ b/web.sh @@ -10,7 +10,7 @@ while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & # Check for Homebrew, # Install if we don't have it -if test ! $(which brew); then +if ! command -v brew >/dev/null 2>&1; then echo "Installing homebrew..." ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" fi