Skip to content

Instantly share code, notes, and snippets.

@fearoffish
Created June 18, 2012 10:36
Show Gist options
  • Save fearoffish/2947803 to your computer and use it in GitHub Desktop.
Save fearoffish/2947803 to your computer and use it in GitHub Desktop.
Workstation Setup Script
# I run this script to install brew, git and rbenv. At this point I can run my chef
# cookbooks to set up the rest of my base applications.
#
# Remote Login turned on in System Preferences -> Sharing
echo "Installing zsh"
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
echo "Done"
echo 'Force zsh as the new $SHELL'
export SHELL='/bin/zsh'
echo "Done"
echo "Installing GCC Tools"
curl -O -L https://github.com/downloads/kennethreitz/osx-gcc-installer/GCC-10.7-v2.pkg
sudo installer -pkg GCC-10.7-v2.pkg -target /
echo "Done"
echo "Installing brew"
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
echo "Done"
echo "Installing git"
brew install git
echo "Done"
echo "Installing rbenv"
cd
brew install rbenv
echo "Done"
# I use zsh, so I set it up for that
echo "Setting up rbenv"
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
# exec /bin/zsh
echo "Done"
echo "Installing ruby-build"
brew install ruby-build
echo "Done"
echo "Installing Ruby 1.9.3"
rbenv install 1.9.3-p194
rbenv rehash
echo "Done"
echo "ALL Done"
exec $SHELL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment