rvm 0.0.17 → 0.0.18
Sign up to get free protection for your applications and to get access to all the features.
- data/bash/rvm +23 -13
- data/rvm.gemspec +1 -1
- metadata +1 -1
data/bash/rvm
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
rvm_author="Wayne E. Seguin"
|
4
4
|
rvm_author_email="wayneeseguin@gmail.com"
|
5
5
|
rvm_website="http://github.com/wayneeseguin/rvm"
|
6
|
-
rvm_version="0.0.
|
6
|
+
rvm_version="0.0.18"
|
7
7
|
rvm_updated="2009.08.25"
|
8
8
|
|
9
9
|
#
|
@@ -70,23 +70,24 @@ function rvm-usage {
|
|
70
70
|
* Defaults above are denoted with a '*' prefix.
|
71
71
|
* rvm is intended to be run as an individual user (not root, yet)
|
72
72
|
* All ruby installation, configuration and source files are in ~/.rvm
|
73
|
-
* To manually reset to defaults: "rm -f ~/.rvm/current", then open new shell
|
74
|
-
* To preserve previous gem installations for a particular ruby version copy,
|
75
|
-
move, symlink or copy the old gem directory to (1.8 for 1.8.X):
|
76
|
-
~/.gem/\$interpreter/\$version
|
77
73
|
|
78
74
|
Examples:
|
79
75
|
|
76
|
+
$ rvm -v # RVM version
|
77
|
+
$ rvm list # available rvm versions
|
78
|
+
$ rvm info # ruby information for current shell
|
80
79
|
$ rvm install jruby # Install jRuby (default version is 1.3.1)
|
81
80
|
$ rvm use ruby -v 1.9.1 # Use Ruby 1.9.1, installs if necessary
|
82
81
|
$ rvm use 1.9 # Equivalent to above, due to defaults
|
83
82
|
$ rvm use 1.8 # Use Ruby 1.8.6, installs if necessary
|
84
|
-
$ rvm use default # Use the system default (as if no rvm)
|
85
|
-
$ rvm gemdup ~/.gem/ruby/1.8/ # Install gems from ~/.gem/ruby/1.8/
|
86
83
|
$ rvm gemdir # Switch to gems directory for current ruby
|
87
84
|
$ rvm gemdir system # Switch to the system gems directory
|
88
85
|
$ rvm gemdir system user # Switch to the system user gems directory
|
89
86
|
$ rvm gemdir ruby 1.9 # Switch to gems directory for ruby 1.9.1
|
87
|
+
$ rvm use default # Use the system default (as if no rvm)
|
88
|
+
$ rvm reset # Reset to pre-rvm state.
|
89
|
+
$ rvm uninstall 1.8.7 # Uninstall rvm installed 1.8.7 version
|
90
|
+
$ rvm gemdup default # Install gems from ~/.gem/ruby/1.8/
|
90
91
|
|
91
92
|
TODO: (in order)
|
92
93
|
|
@@ -477,9 +478,11 @@ function rvm-use {
|
|
477
478
|
else
|
478
479
|
rvm-log-fail "Your shell is not supported bash and zsh are currently supported."
|
479
480
|
fi
|
481
|
+
|
480
482
|
}
|
481
483
|
|
482
484
|
function rvm-list {
|
485
|
+
|
483
486
|
echo -e "\nruby:"
|
484
487
|
ls -l $install_path/ | awk '/ ruby-[1-2].*/ { print " - " $NF }'
|
485
488
|
echo
|
@@ -491,6 +494,7 @@ function rvm-list {
|
|
491
494
|
echo
|
492
495
|
echo "default:"
|
493
496
|
echo " - system (`$default_system_ruby -v`)"
|
497
|
+
|
494
498
|
}
|
495
499
|
|
496
500
|
function rvm-reset {
|
@@ -612,7 +616,14 @@ function rvm-src-dir {
|
|
612
616
|
# clones from source implementation/version to current
|
613
617
|
function rvm-gem-dup {
|
614
618
|
|
615
|
-
|
619
|
+
if [ "$1" = "default" ] ; then
|
620
|
+
gem_dir="$default_gem_path"
|
621
|
+
elif [ "$1" = "system" ] ; then
|
622
|
+
gem_dir="$default_system_gem_path"
|
623
|
+
else
|
624
|
+
gem_dir=${1-$default_gem_path} # TODO: check for and remove trailing /gems
|
625
|
+
fi
|
626
|
+
|
616
627
|
if [ ! -z "$gem_dir" ] ; then
|
617
628
|
for gem_name_version in `ls $gem_dir/gems` ; do
|
618
629
|
gem_name=${gem_name_version%-*}
|
@@ -641,7 +652,7 @@ function rvm {
|
|
641
652
|
while [ $# -gt 0 ] ; do
|
642
653
|
token="$1" ; shift
|
643
654
|
case "$token" in
|
644
|
-
install|uninstall|use|path|info|setup|version|srcdir|list|reset|debug)
|
655
|
+
install|uninstall|use|path|info|setup|version|srcdir|list|reset|debug|gemdup)
|
645
656
|
action=$token
|
646
657
|
;;
|
647
658
|
|
@@ -680,7 +691,6 @@ function rvm {
|
|
680
691
|
-p|--prefix) install_path="$1" ; shift ;;
|
681
692
|
-s|--source) source_path="$1" ; shift ;; # Undocumented / untested "feature"
|
682
693
|
-c|--configure) configure="$1" ; shift ;;
|
683
|
-
-u|--gemdup) action="gemdup" ; gem_dir="$1" ; shift ;;
|
684
694
|
-d|--debug) debug=1 ;;
|
685
695
|
*) rvm-usage ; return 1
|
686
696
|
esac
|
@@ -709,7 +719,7 @@ function rvm {
|
|
709
719
|
source_path="${source_path-"${prefix_path}rvm/src"}"
|
710
720
|
install_path="${prefix_path}rvm"
|
711
721
|
|
712
|
-
mkdir -p $
|
722
|
+
mkdir -p $source_path $install_path/bin
|
713
723
|
|
714
724
|
if [ ! -f $install_path/default ] ; then
|
715
725
|
for variable in RUBY_VERSION GEM_HOME MY_RUBY_HOME PATH ; do
|
@@ -779,9 +789,9 @@ function rvm {
|
|
779
789
|
rvm-version
|
780
790
|
rvm-info
|
781
791
|
rvm-log-info "PATH:$(echo $PATH | awk -F":" '{print $1":"$2":"$3":"$4":"$5}')"
|
782
|
-
for file in
|
792
|
+
for file in .bash_profile .zshrc ; do
|
783
793
|
if [ -s $file ] ; then
|
784
|
-
rvm-log-info "
|
794
|
+
rvm-log-info "~/$file: \n$(cat ~/$file| tail -n 5)\n"
|
785
795
|
fi
|
786
796
|
done
|
787
797
|
rvm-log-info "$install_path/current: \n$(cat $install_path/current)\n"
|
data/rvm.gemspec
CHANGED