Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # Copy this script to ~/.bash_profile
- #
- brew-cask-upgrade() {
- local caskdir=/usr/local/Caskroom
- for app in $(brew cask list); do
- local latest=$(brew cask info $app|awk 'NR==1&&$0=$2')
- local current=$(ls $caskdir/$app/.metadata|tail -1)
- echo -n "$app: $current -> $latest "
- if [[ $latest != $current ]]; then
- echo "updating..."
- brew cask uninstall $app --force
- brew cask install $app
- else
- echo "skipped."
- fi
- done
- }
Add Comment
Please, Sign In to add comment