Created
September 24, 2010 15:46
-
-
Save gmarik/595577 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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