#!/bin/bash

# for more info, see:
#   - http://blog.therubymug.com/blog/2010/05/20/the-install-osx.html
#   - http://wiki.github.com/mxcl/homebrew/gems-eggs-and-perl-modules


# setup .gemrc for use with RVM (Ruby Version Manager)
echo -e '---
:verbose: true 
:bulk_threshold: 1000 
:sources:
- http://rubygems.org
gem: --no-ri --no-rdoc
:benchmark: false
:update_sources: true 
:backtrace: false' > ~/.gemrc


# install RVM
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
echo -e '
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"  # This loads RVM into a shell session.' >> ~/.bashrc


# update RVM
rvm get head