Last active
March 9, 2017 21:58
-
-
Save childnode/d35cf810dd28775ac5c0e491107215fd to your computer and use it in GitHub Desktop.
brew-cask-check-updates
This file contains hidden or 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
for cask in $(brew cask list -1); do | |
echo -n "${cask} : "; | |
caskLatest=$(brew cask info $cask | head -1 | awk -F: '{print $2}' | tr -d '[[:space:]]'); | |
caskCurrentDir=$(brew cask info $cask | grep -e "^$(brew --prefix).*/${cask}/"| head -1| awk '{print $1}'); | |
[ ! -d $(dirname ${caskCurrentDir})/${caskLatest} ] && echo "outdated : ("$(basename ${caskCurrentDir})" -> "${caskLatest}")" || echo "current"; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a type of q'n'dirty "workaround"
to update all outdated casks e.g.:
. ./brew-cask-check-updates.bash | awk -F: '{if ($2 ~ "outdated") print $1}' | xargs brew cask reinstall
other 'hacks' found:
https://gist.github.com/atais/9c72e469b1cbec35c7c430ce03de2a6b
or
https://github.com/buo/homebrew-cask-upgrade
via
see right place to discuss the clean solution: Homebrew/homebrew-cask#29301