Skip to content

Instantly share code, notes, and snippets.

@orkoden
Last active December 17, 2015 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orkoden/5656351 to your computer and use it in GitHub Desktop.
Save orkoden/5656351 to your computer and use it in GitHub Desktop.
A little script to update all currently installed programs with homebrew. Also removes old versions.
#!/bin/sh
echo "searching for updates..."
brewoutput=`brew update`
if [ "$brewoutput" == "Already up-to-date." ]
then
echo "nothing to update"
else
echo "updating..."
brewoutput=`brew upgrade --all`
if [[ "$brewoutput" == *".app bundles were installed."* ]]
then
echo "symlinking apps to /Applications..."
brew linkapps
fi
echo "removing old stuff..."
brew cleanup
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment