Guest User

Untitled

a guest
Nov 21st, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #
  2. # Copy this script to ~/.bash_profile
  3. #
  4. brew-cask-upgrade() {
  5. local caskdir=/usr/local/Caskroom
  6. for app in $(brew cask list); do
  7. local latest=$(brew cask info $app|awk 'NR==1&&$0=$2')
  8. local current=$(ls $caskdir/$app/.metadata|tail -1)
  9. echo -n "$app: $current -> $latest "
  10. if [[ $latest != $current ]]; then
  11. echo "updating..."
  12. brew cask uninstall $app --force
  13. brew cask install $app
  14. else
  15. echo "skipped."
  16. fi
  17. done
  18. }
Add Comment
Please, Sign In to add comment