Skip to content

Instantly share code, notes, and snippets.

@gmarik
Created September 24, 2010 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gmarik/595577 to your computer and use it in GitHub Desktop.
Save gmarik/595577 to your computer and use it in GitHub Desktop.
#!/bin/sh
which rvm >/dev/null 2>&1 || (echo 'requires RVM' && exit 1)
RUBY=$(rvm list default string)
function install()
{
echo "
Plan:
1. Install RVM readline package
2. Rebuild default ruby with Readline support
3. PROFIT!
"
echo "1. Installing RVM Readline package"
rvm package install readline
echo "2. Rebuilding $RUBY with Readline support"
rvm install $RUBY -C --with-readline-dir=$HOME/.rvm/usr
}
function uninstall()
{
echo "1. Rebuilding $RUBY without Readline support"
rvm install $RUBY
}
case $* in
--remove)
uninstall
;;
*)
install
;;
esac
# vim: ft=sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment