Created
April 6, 2016 02:14
-
-
Save keif/f02b38ed3b1758486880fc5160a3e828 to your computer and use it in GitHub Desktop.
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
weather() { | |
# ?u/m for changing metrics | |
curl "http://wttr.in/${1-}"; | |
echo "weather [CITY/ZIP]"; | |
} | |
moon() { | |
curl "http://wttr.in/moon${1-}"; | |
echo "moon [@dateYYYY-MMM-DD]" | |
} | |
brew_cask_upgrade() { | |
if [ "$1" != '--continue' ]; then | |
echo "Removing brew cache" | |
rm -rf "$(brew --cache)" | |
echo "Running brew update" | |
brew update | |
fi | |
for c in $(brew cask list); do | |
echo -e "\n\nInstalled versions of $c: " | |
ls /opt/homebrew-cask/Caskroom/$c | |
echo "Cask info for $c" | |
brew cask info $c | |
echo "Install new version?" | |
select ynx in "Yes" "No" "Exit"; do | |
case $ynx in | |
"Yes") echo "Uninstalling $c"; brew cask uninstall --force "$c"; echo "Re-installing $c"; brew cask install "$c" --appdir="/Applications/"; break;; | |
"No") echo "Skipping $c"; break;; | |
"Exit") echo "Exiting brew-cask-upgrade"; return;; | |
esac | |
done | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment