#!/bin/bash set -e cd "$(dirname "$0")/.." rbenv which ruby >/dev/null 2>&1 || (brew upgrade ruby-build || true; rbenv install) # Setup rbenv so we can switch rubies below eval "$(rbenv init - --no-rehash)" for ruby_version in `ruby -ryaml -e 'puts YAML.load(File.read(".travis.yml"))["rvm"].join(" ")'`; do rbenv versions --bare | grep "^${ruby_version}$" || rbenv install $ruby_version rbenv shell $ruby_version gem list -i bundler >/dev/null || gem install bundler bundle install done tput bold # bold text tput setaf 2 # green text echo "****************************************************************" echo "* *" echo "* Good to go! *" echo "* *" echo "****************************************************************" tput sgr0 # reset to default text