Last active
December 29, 2015 23:59
-
-
Save elexx/7746831 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
for app in $(brew cask list); do # For every app in the Caskroom, do this | |
appToCheck=$(brew cask list "${app}" 2>&1 >/dev/null | grep "${app} is not installed") # If the app is not marked as not installed `brew cask list "app"`, this variable will be "Warning: "app" is not installed", | |
if [[ ! -z "${appToCheck}" ]]; then # If the variable is empty, then | |
brew cask install --force "${app}" # Force an install of the app | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment