Skip to content

Instantly share code, notes, and snippets.

@zh4n7wm
Created May 21, 2017 04:23
Show Gist options
  • Save zh4n7wm/0ead0f9f6cb76fd1eccb5ed68cd0d734 to your computer and use it in GitHub Desktop.
Save zh4n7wm/0ead0f9f6cb76fd1eccb5ed68cd0d734 to your computer and use it in GitHub Desktop.
brew cask upgrade
#!/bin/bash
red=$(tput setaf 1)
# green=$(tput setaf 2)
reset=$(tput sgr0)
(set -x; brew update;)
for cask in $(brew cask outdated | awk '{print $1}')
do
echo "${red}update ${cask} ...${reset}."
# (set -x; brew cask reinstall "$cask";)
(set -x; brew cask install --force "$cask";)
done
echo "${red}brew clean up ...${reset}"
(set -x; brew cleanup;)
(set -x; brew cask cleanup;)
echo "${red}brew clean up done.${reset}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment