#!/usr/bin/env bash environment_id="ruby-1.9.2-p290@pivot_table" if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \ && -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]] then \. "${rvm_path:-$HOME/.rvm}/environments/$environment_id" if [[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]] then . "${rvm_path:-$HOME/.rvm}/hooks/after_use" fi echo "RVM environment: ${environment_id}" else # If the environment file has not yet been created, use the RVM CLI to select. if ! rvm --create "$environment_id" then echo "Failed to create RVM environment '${environment_id}'." exit 1 fi fi