-
-
Save leandroh/408736 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
#!/bin/sh | |
curl http://gist.github.com/raw/323731/install_homebrew > install_homebrew.rb | |
ruby install_homebrew.rb | |
rm install_homebrew.rb | |
echo "PATH=/usr/local/bin:/Developer/usr/bin:\$PATH; export PATH" >> ~/.profile | |
source ~/.profile | |
echo "Your path is now $PATH" | |
brew install git | |
brew update | |
# installing mysql | |
brew install mysql | |
if [[ "$?" -eq "0" ]]; then | |
MYSQL_VERSION=`brew list mysql | awk -F/ '{print $6}' | head -n1` | |
/usr/local/Cellar/mysql/$MYSQL_VERSION/bin/mysql_install_db | |
cp /usr/local/Cellar/mysql/$MYSQL_VERSION/com.mysql.mysqld.plist ~/Library/LaunchAgents | |
launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist | |
else | |
echo "Unable to install mysql, weak" | |
exit 1 | |
fi | |
# installing postgres | |
brew install postgresql | |
if [[ "$?" -eq "0" ]]; then | |
POSTGRESQL_VERSION=`brew list postgresql | awk -F/ '{print $6}' | head -n 1` | |
initdb /usr/local/var/postgres | |
launchctl load -w /usr/local/Cellar/postgresql/$POSTGRESQL_VERSION/org.postgresql.postgres.plist | |
else | |
echo "Unable to install postgresql, weak" | |
exit 1 | |
fi | |
# install mongo | |
brew install mongo | |
if [[ "$?" -eq "0" ]]; then | |
MONGODB_VERSION=`brew list mongodb | awk -F/ '{print $6}' | head -n 1` | |
cp /usr/local/Cellar/mongodb/$MONGODB_VERSION/org.mongodb.mongod.plist ~/Library/LaunchAgents | |
launchctl load -w ~/Library/LaunchAgents/org.mongodb.mongod.plist | |
else | |
echo "Unable to install mongodb, weak" | |
exit 1 | |
fi | |
# install a bunch of utils | |
for i in node rlwrap kiwi ack sqlite hub wget; do | |
brew install $i | |
done | |
# install rvm for ease of use | |
sudo gem install rvm | |
rvm-install | |
echo "if [[ -s /Users/$USER/.rvm/scripts/rvm ]] ; then source /Users/$USER/.rvm/scripts/rvm ; fi" >> ~/.profile | |
source ~/.profile | |
# setup the default 1.8.7 version | |
rvm install 1.8.7-p173 | |
rvm use 1.8.7-p173 | |
echo "rvm use 1.8.7-p173" >> ~/.profile | |
# install bundler | |
gem install bundler | |
git clone git://github.com/atmos/hancock.git | |
cd hancock/ | |
bundle install | |
bundle exec rake | |
if [[ "$?" -eq "0" ]]; then | |
echo "Successfully bootstrapped your machine" | |
else | |
echo "Shit failed. :(" | |
fi | |
#wget http://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh | |
#cat ~/.profile >> ~/.zshrc | |
#rm ~/.profile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment