Advertisement
opexxx

brew cask update ALL

Jan 3rd, 2020
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.45 KB | None | 0 0
  1. for c in $(brew cask list); do                                          
  2.     info=$(brew cask info $c)
  3.     installed_ver=$(echo "$info" | cut -d$'\n' -f1 | tr -d ' ' | cut -d':' -f 2)
  4.     current_ver=$(echo "$info" | cut -d$'\n' -f3 | cut -d' ' -f 1 | rev | cut -d'/' -f 1 | rev)
  5.     if [ "$installed_ver" != "$current_ver" ]; then
  6.         echo "$c is installed '$installed_ver', current is '$current_ver'"
  7.         brew cask reinstall $c
  8.     fi
  9. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement