Skip to content

Instantly share code, notes, and snippets.

@rabinshr
Last active August 29, 2015 14:16
Show Gist options
  • Save rabinshr/3df969bea93e70029119 to your computer and use it in GitHub Desktop.
Save rabinshr/3df969bea93e70029119 to your computer and use it in GitHub Desktop.
Package manager for Max OSX
#!/bin/bash
which -s brew
if [[ $? != 0 ]] ; then
# Install Homebrew
echo "installing brew"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
else
echo "updating brew"
brew update
brew doctor
fi
#### Binaries ##########
#--------------------------#
binaries=(
wget
git
ant
php54
mysql
)
for binary in "${binaries[@]}"
do
echo "installing $binary"
which -s "$binary" || brew install "$binary"
done
### Homebrew Cask ###
#------------------#
brew tap caskroom/cask
brew tap caskroom/versions
brew install brew-cask
#### Apps ####
#-----------#
apps=(
virtualbox
vagrant
vagrant-manager
google-chrome
diffmerge
sublime-text3
)
for app in "${apps[@]}"
do
echo "installing $app"
which -s $app || brew cask install --appdir="/Applications" $app
done
brew cask cleanup
brew cask doctor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment