Skip to content

Instantly share code, notes, and snippets.

@orkoden orkoden/brewpdate.sh
Last active Dec 17, 2015

Embed
What would you like to do?
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
You can’t perform that action at this time.