Last active
December 17, 2015 18:49
-
-
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.
This file contains 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
#!/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