Created
June 3, 2014 09:43
-
-
Save j6s/f876b3733ae08e95216f 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
#! /bin/bash | |
caskApps=$(ls /opt/homebrew-cask/Caskroom/) # Lists the casks in the Caskroom | |
apps=$(brew cask list); | |
for app in ${caskApps}; do # For every app there, do this | |
appToCheck=$(echo "${apps}" | grep "${app}") # If the app is not present in `brew cask list`, this variable will be empty | |
if [[ -z "${appToCheck}" ]]; then # If the variable is empty, then | |
echo "updating ${app}"; | |
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