Last active
August 29, 2015 13:56
-
-
Save tavisto/8835057 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
BREW='/usr/local/bin/brew' | |
if [ -f $BREW ]; then | |
echo "Tapping all the kegs!" | |
taps='homebrew/versions' | |
tapped=`$BREW tap` | |
for tap in $taps | |
do | |
if [[ "$tapped" != *$tap* ]] | |
then | |
brew_command="$BREW tap $tap" | |
$brew_command | |
fi | |
done | |
echo "Updating brew" | |
$BREW update | |
echo "Installing stuff if needed" | |
packages='git bash bash-completion2 homebrew/completions/vagrant-completion' | |
installed=`$BREW list` | |
for package in $packages | |
do | |
if [[ "$installed" != *$package* ]] | |
then | |
brew_command="$BREW install $package" | |
$brew_command | |
fi | |
done | |
echo "Upgrading stuff" | |
$BREW upgrade | |
echo "Linking stuff" | |
$BREW linkapps | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment