Skip to content

Instantly share code, notes, and snippets.

@alexmaloteaux
Created August 11, 2013 17:16
Show Gist options
  • Save alexmaloteaux/6205938 to your computer and use it in GitHub Desktop.
Save alexmaloteaux/6205938 to your computer and use it in GitHub Desktop.
#rvm
if [ ! -f "/usr/local/rvm/scripts/rvm" ]
then
echo "!!!Error!!!"
echo "Can not find rvm script, either rvm is not installed or this script is buggy :)"
echo ""
return
else
source /usr/local/rvm/scripts/rvm
fi
#ruby
if [ -z "$(rvm list | grep $RUBY_VERSION)" ]
then
echo "!!!Error!!!"
echo "Ruby $RUBY_VERSION does not seem to be installed"
echo ""
return
else
rvm $RUBY_VERSION
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment