I am writing a script to automate the setup of development environments on a mac, however I am running into an issue on some peoples macs where cask (Homebrew extension) does not install. Is there a way I can check if cask has been installed in bash?
Ideally I am looking for something like:
if caskIsInstalled then
# do stuff...
fi
I have been able to verify that brew itself is installed using the type
command, but I can't figure out a way to verify cask.
if ! type "brew" > /dev/null; then
echo "Failed to install Homebrew"
# do stuff...
fi