rvm 0.0.15 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +20 -7
- data/bash/rvm +49 -24
- data/bash/rvm-install +32 -15
- metadata +1 -1
data/README
CHANGED
@@ -1,10 +1,15 @@
|
|
1
1
|
|
2
2
|
About:
|
3
3
|
|
4
|
-
rvm 0.0.
|
4
|
+
rvm 0.0.16 http://github.com/wayneeseguin/rvm
|
5
5
|
|
6
6
|
by Wayne E. Seguin (wayneeseguin@gmail.com)
|
7
7
|
|
8
|
+
Installation:
|
9
|
+
|
10
|
+
$ gem install rvm # Install the rvm gem
|
11
|
+
$ rvm-install # Install rvm, adds hooks for bash & zsh
|
12
|
+
|
8
13
|
Usage:
|
9
14
|
|
10
15
|
rvm Action [Implementation] [Options]
|
@@ -12,16 +17,16 @@
|
|
12
17
|
Action:
|
13
18
|
|
14
19
|
* usage - Show this usage information
|
15
|
-
use - Switch to using a specific ruby
|
20
|
+
use - Switch to using a specific ruby version (new login shell)
|
16
21
|
info - Show information for current ruby
|
17
22
|
list - Show currently installed versions
|
18
23
|
gemdir - Switch to gem directory for installation (new login shell)
|
19
24
|
srcdir - Switch to src directory for the current ruby installation
|
20
|
-
gemdup - Clone source
|
25
|
+
gemdup - Clone source version gems to current version
|
21
26
|
(highly expiramental) Example: rvm gemdup ~/.gem/ruby/1.8/
|
22
27
|
install - Install a ruby version, default is from source
|
23
28
|
uninstall - Uninstall a ruby version
|
24
|
-
debug - Emit environment
|
29
|
+
debug - Emit environment & configuration information for *current* ruby
|
25
30
|
|
26
31
|
Implementation:
|
27
32
|
|
@@ -52,8 +57,6 @@
|
|
52
57
|
|
53
58
|
Examples:
|
54
59
|
|
55
|
-
$ gem install rvm # Install the rvm gem
|
56
|
-
$ rvm-install # Install rvm, adds hooks for bash & zsh
|
57
60
|
$ rvm install jruby # Install jRuby (default version is 1.3.1)
|
58
61
|
$ rvm use ruby -v 1.9.1 # Use Ruby 1.9.1, installs if necessary
|
59
62
|
$ rvm use 1.9 # Equivalent to above, due to defaults
|
@@ -72,7 +75,7 @@
|
|
72
75
|
* Settings file, user overridable
|
73
76
|
* Show current in rvm list, if applicable
|
74
77
|
|
75
|
-
|
78
|
+
Many Thanks:
|
76
79
|
|
77
80
|
Bash Support Testing
|
78
81
|
|
@@ -87,3 +90,13 @@
|
|
87
90
|
- Franco Lazzarino (flazzarino@gmail.com)
|
88
91
|
irc: flazz ; github: http://github.com/flazz
|
89
92
|
|
93
|
+
Ubuntu Linux Support Testing
|
94
|
+
|
95
|
+
- Anita Kuno (anteaya@anteaya.info)
|
96
|
+
irc: anteaya ; github: http://github.com/anteaya
|
97
|
+
|
98
|
+
Website Design
|
99
|
+
|
100
|
+
- Jim Lindley (jlindley@gmail.com)
|
101
|
+
irc: jlindley ; github: http://github.com/jlindley
|
102
|
+
|
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.16"
|
7
7
|
rvm_updated="2009.08.25"
|
8
8
|
|
9
9
|
#
|
@@ -23,6 +23,11 @@ function rvm-usage {
|
|
23
23
|
|
24
24
|
by ${rvm_author} (${rvm_author_email})
|
25
25
|
|
26
|
+
Installation:
|
27
|
+
|
28
|
+
$ gem install rvm # Install the rvm gem
|
29
|
+
$ rvm-install # Install rvm, adds hooks for bash & zsh
|
30
|
+
|
26
31
|
Usage:
|
27
32
|
|
28
33
|
rvm Action [Implementation] [Options]
|
@@ -30,7 +35,7 @@ function rvm-usage {
|
|
30
35
|
Action:
|
31
36
|
|
32
37
|
* usage - Show this usage information
|
33
|
-
use - Switch to using a specific ruby
|
38
|
+
use - Switch to using a specific ruby version (new login shell)
|
34
39
|
info - Show information for current ruby
|
35
40
|
list - Show currently installed versions
|
36
41
|
gemdir - Switch to gem directory for installation (new login shell)
|
@@ -70,8 +75,6 @@ function rvm-usage {
|
|
70
75
|
|
71
76
|
Examples:
|
72
77
|
|
73
|
-
$ gem install rvm # Install the rvm gem
|
74
|
-
$ rvm-install # Install rvm, adds hooks for bash & zsh
|
75
78
|
$ rvm install jruby # Install jRuby (default version is 1.3.1)
|
76
79
|
$ rvm use ruby -v 1.9.1 # Use Ruby 1.9.1, installs if necessary
|
77
80
|
$ rvm use 1.9 # Equivalent to above, due to defaults
|
@@ -90,7 +93,7 @@ function rvm-usage {
|
|
90
93
|
* Settings file, user overridable
|
91
94
|
* Show current in rvm list, if applicable
|
92
95
|
|
93
|
-
|
96
|
+
Many Thanks:
|
94
97
|
|
95
98
|
Bash Support Testing
|
96
99
|
|
@@ -105,6 +108,16 @@ function rvm-usage {
|
|
105
108
|
- Franco Lazzarino (flazzarino@gmail.com)
|
106
109
|
irc: flazz ; github: http://github.com/flazz
|
107
110
|
|
111
|
+
Ubuntu Linux Support Testing
|
112
|
+
|
113
|
+
- Anita Kuno (anteaya@anteaya.info)
|
114
|
+
irc: anteaya ; github: http://github.com/anteaya
|
115
|
+
|
116
|
+
Website Design
|
117
|
+
|
118
|
+
- Jim Lindley (jlindley@gmail.com)
|
119
|
+
irc: jlindley ; github: http://github.com/jlindley
|
120
|
+
|
108
121
|
Usage
|
109
122
|
|
110
123
|
}
|
@@ -167,7 +180,7 @@ function rvm-install-source {
|
|
167
180
|
else
|
168
181
|
if [ ! -f "$package_name.tar.gz" ] ; then
|
169
182
|
rvm-log-info "\tDownloading $package_name, this may take a while depending on your connection..."
|
170
|
-
curl
|
183
|
+
$curl $url
|
171
184
|
fi
|
172
185
|
rvm-log-info "\tExtracting $package_name..."
|
173
186
|
tar xzf $package_name.tar.gz && cd $package_name
|
@@ -184,7 +197,7 @@ function rvm-install-source {
|
|
184
197
|
chmod +x $install_path/$package_name/bin/*
|
185
198
|
|
186
199
|
# Create the ~/.rvm/bin/$package_name
|
187
|
-
ln -
|
200
|
+
ln -fs $install_path/$package_name/bin/ruby $install_path/bin/$package_name
|
188
201
|
|
189
202
|
# Now install rubygems for this ruby version.
|
190
203
|
rvm-log-info "\tInstalling rubygems dedicated to $package_name..."
|
@@ -193,7 +206,7 @@ function rvm-install-source {
|
|
193
206
|
if [ -d $gem_package_name ] ; then
|
194
207
|
cd $gem_package_name
|
195
208
|
else
|
196
|
-
if [ ! -f $gem_package_name.tgz ] ; then curl
|
209
|
+
if [ ! -f $gem_package_name.tgz ] ; then $curl $gem_url ; fi
|
197
210
|
tar zxf $gem_package_name.tgz && cd $gem_package_name
|
198
211
|
fi
|
199
212
|
# Well this is fun... fix nil error on require_paths:
|
@@ -224,7 +237,7 @@ function rvm-install-ruby {
|
|
224
237
|
else
|
225
238
|
if [ ! -f "$package_name.tar.gz" ] ; then
|
226
239
|
rvm-log-info "\tDownloading $package_name, this may take a while depending on your connection..."
|
227
|
-
curl
|
240
|
+
$curl $url
|
228
241
|
fi
|
229
242
|
rvm-log-info "\tExtracting $package_name..."
|
230
243
|
tar xzf $package_name.tar.gz && cd $package_name
|
@@ -235,7 +248,7 @@ function rvm-install-ruby {
|
|
235
248
|
./installer -a $install_path/ruby-enterprise-$version-$patchlevel --dont-install-useful-gems > $install_path/$package_name/install.log 2> $install_path/$package_name/install.error.log
|
236
249
|
chmod +x $install_path/$package_name/bin/*
|
237
250
|
|
238
|
-
ln -
|
251
|
+
ln -fs $install_path/$package_name/bin/ruby $install_path/bin/$package_name
|
239
252
|
|
240
253
|
rvm-log-info "\tInstalling rubygems dedicated to $package_name..."
|
241
254
|
gem_package_name="rubygems-1.3.5"
|
@@ -243,7 +256,7 @@ function rvm-install-ruby {
|
|
243
256
|
if [ -d $gem_package_name ] ; then
|
244
257
|
cd $gem_package_name
|
245
258
|
else
|
246
|
-
if [ ! -f $gem_package_name.tgz ] ; then curl
|
259
|
+
if [ ! -f $gem_package_name.tgz ] ; then $curl $gem_url ; fi
|
247
260
|
tar zxf $gem_package_name.tgz && cd $gem_package_name
|
248
261
|
fi
|
249
262
|
# Well this is fun... fix nil error on require_paths:
|
@@ -273,7 +286,7 @@ function rvm-install-ruby {
|
|
273
286
|
else
|
274
287
|
if [ ! -f "$zipfile.zip" ] ; then
|
275
288
|
rvm-log-info "\tDownloading $zipfile, this may take a while depending on your connection..."
|
276
|
-
curl
|
289
|
+
$curl $url
|
277
290
|
fi
|
278
291
|
rvm-log-info "\tExtracting $zipfile..."
|
279
292
|
jar xf $zipfile.zip
|
@@ -286,10 +299,10 @@ function rvm-install-ruby {
|
|
286
299
|
popd > /dev/null
|
287
300
|
chmod +x $install_path/$package_name/bin/*
|
288
301
|
for binary in jruby jgem jirb ; do
|
289
|
-
ln -
|
302
|
+
ln -fs $install_path/$package_name/bin/$binary $install_path/$package_name/bin/${binary#j}
|
290
303
|
done
|
291
304
|
|
292
|
-
ln -
|
305
|
+
ln -fs $install_path/$package_name/bin/ruby $install_path/bin/$package_name
|
293
306
|
|
294
307
|
for gem_name in rake jruby-openssl ; do
|
295
308
|
rvm-log-info "Installing $gem_name"
|
@@ -606,6 +619,7 @@ function rvm {
|
|
606
619
|
for variable in action implementation patchlevel version source_path install_path manager debug prefix_path ; do
|
607
620
|
eval "unset $variable"
|
608
621
|
done
|
622
|
+
|
609
623
|
while [ $# -gt 0 ] ; do
|
610
624
|
token="$1" ; shift
|
611
625
|
case "$token" in
|
@@ -617,13 +631,14 @@ function rvm {
|
|
617
631
|
;;
|
618
632
|
gemdir)
|
619
633
|
action=$token
|
620
|
-
if [ "$
|
621
|
-
implementation="system"
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
implementation="current"
|
634
|
+
if [ "$1" = "system" ] ; then
|
635
|
+
implementation="system" ; shift
|
636
|
+
fi
|
637
|
+
if [ "$1" = "user" ] ; then
|
638
|
+
implementation="user" ; shift
|
626
639
|
fi
|
640
|
+
|
641
|
+
implementation="${implementation-current}"
|
627
642
|
;;
|
628
643
|
1.8|1.8.6|1.8.7|1.9|1.9.1|1.9.2|1.2.0|1.3.1)
|
629
644
|
version="$token"
|
@@ -646,7 +661,14 @@ function rvm {
|
|
646
661
|
*) rvm-usage ; return 1
|
647
662
|
esac
|
648
663
|
done
|
649
|
-
|
664
|
+
|
665
|
+
curl=`which curl`
|
666
|
+
if [ $? -ne 0 ] ; then
|
667
|
+
rvm-log-fail "rvm expects that curl is available, which curl shows no curl :("
|
668
|
+
else
|
669
|
+
curl="$curl -O -L -s"
|
670
|
+
fi
|
671
|
+
|
650
672
|
if [ -z "$implementation" -a -z "$version" ] ; then
|
651
673
|
implementation="default"
|
652
674
|
else
|
@@ -723,9 +745,12 @@ function rvm {
|
|
723
745
|
debug)
|
724
746
|
rvm-version
|
725
747
|
rvm-info
|
726
|
-
rvm-log-info "PATH:$(echo $PATH | awk -F":" '{print $1":"$2":"$3":"$4":"
|
727
|
-
|
728
|
-
|
748
|
+
rvm-log-info "PATH:$(echo $PATH | awk -F":" '{print $1":"$2":"$3":"$4":"$5}')"
|
749
|
+
for file in ~/.bash_profile ~/.zprofile ; do
|
750
|
+
if [ -s $file ] ; then
|
751
|
+
rvm-log-info "$file: \n$(cat ~/$file| tail -n 5)\n"
|
752
|
+
fi
|
753
|
+
done
|
729
754
|
rvm-log-info "$install_path/current: \n$(cat $install_path/current)\n"
|
730
755
|
return 0
|
731
756
|
;;
|
data/bash/rvm-install
CHANGED
@@ -19,40 +19,38 @@ echo -e "$info In order to use rvm two items must occur in your shell's load pat
|
|
19
19
|
echo -e "\n\e[0;32m (a)\e[0m if [ -f ~/.rvm/bin/rvm ] ; then source ~/.rvm/bin/rvm ; fi"
|
20
20
|
echo -e "\e[0;32m (b)\e[0m if [ -f ~/.rvm/current ] ; then source ~/.rvm/current ; fi"
|
21
21
|
|
22
|
-
echo -n -e "$question Would you like (u)s to set this up for you, or do it (y)ourself (u/y)? "
|
23
22
|
while : ; do
|
23
|
+
echo -n -e "$question Do you want this (s)cript to set this up for you, or do it (m)anually yourself ('s' or 'm')? "
|
24
24
|
read response
|
25
|
-
if [ "${response:0:1}" = "
|
25
|
+
if [ "${response:0:1}" = "s" ] ; then
|
26
26
|
echo 'w00t!'
|
27
27
|
break
|
28
|
-
elif [ "${response:0:1}" = "
|
28
|
+
elif [ "${response:0:1}" = "m" ] ; then
|
29
29
|
echo -e "$info Please make sure that both lines (a) and (b) are in place, with (a) sourced *first*."
|
30
30
|
break
|
31
|
-
else
|
32
|
-
echo -n -e "$question Would you like (u)s to set this up for you, or do it yoursel(f) (u/f)? "
|
33
31
|
fi
|
34
32
|
done
|
35
33
|
|
36
|
-
if [ "${response:0:1}" = "
|
34
|
+
if [ "${response:0:1}" = "s" ] ; then
|
37
35
|
|
38
|
-
# Find out the user's shell bash / zsh
|
39
|
-
echo -n -e "$question Do you use (b)ash or (z)sh for your shell (the default on most *nix systems is bash, press control + C to cancel the installation)\n(b/z) ? "
|
40
36
|
while : ; do
|
37
|
+
echo -n -e "$question Do you use b(a)sh or (z)sh or b(o)th for your shell (the default on most *nix systems is bash, press control + C to cancel the installation)\n(a/z/o)? "
|
41
38
|
read response
|
42
|
-
if [ "${response:0:1}" = "
|
39
|
+
if [ "${response:0:1}" = "a" ] ; then
|
43
40
|
user_shell="bash"
|
44
41
|
break
|
45
42
|
elif [ "${response:0:1}" = "z" ] ; then
|
46
43
|
user_shell="zsh"
|
47
44
|
break
|
48
|
-
|
49
|
-
|
45
|
+
elif [ "${response:0:1}" = "o" ] ; then
|
46
|
+
user_shell="both"
|
47
|
+
break
|
50
48
|
fi
|
51
49
|
done
|
52
50
|
|
53
51
|
touch ~/.profile
|
54
52
|
|
55
|
-
if [ "$user_shell" = "bash" ] ; then
|
53
|
+
if [ "$user_shell" = "bash" -o "$user_shell" = "both" ] ; then
|
56
54
|
|
57
55
|
touch ~/.bash_profile
|
58
56
|
if [ -z "`grep '\.rvm/bin/rvm' ~/.bash_profile`" ] ; then
|
@@ -65,7 +63,7 @@ if [ "${response:0:1}" = "u" ] ; then
|
|
65
63
|
echo "if [ -f ~/.rvm/current ] ; then source ~/.rvm/current ; fi" >> ~/.bash_profile
|
66
64
|
fi
|
67
65
|
|
68
|
-
elif [ "$user_shell" = "zsh" ] ; then
|
66
|
+
elif [ "$user_shell" = "zsh" -o "$user_shell" = "both" ] ; then
|
69
67
|
|
70
68
|
touch ~/.zshrc
|
71
69
|
if [ -z "`grep '\.rvm/bin/rvm' ~/.zshrc`" ] ; then
|
@@ -86,10 +84,29 @@ if [ "${response:0:1}" = "u" ] ; then
|
|
86
84
|
fi
|
87
85
|
fi
|
88
86
|
|
89
|
-
|
87
|
+
system=`uname`
|
88
|
+
if [ "$system" = "Linux" ] ; then
|
89
|
+
echo -e "For jRuby (if you wish to use it) you will need:"
|
90
|
+
if [ ! -z "`which apt-get`" ] ; then
|
91
|
+
echo -e " sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk "
|
92
|
+
elif [ ! -z "`which emerge`" ] ; then
|
93
|
+
echo -e "emerge dev-java/sun-jdk dev-java/sun-jre-bin"
|
94
|
+
elif [ ! -z "`which pacman`" ] ; then
|
95
|
+
echo -e "pacman -Sy jdk jre"
|
96
|
+
elif [ ! -z "`which yum`" ] ; then
|
97
|
+
echo -e "yum install -y rpm-build gcc gcc-c++ redhat-rpm-config ; then download and rpmbuild and install the sdk, Have fun..."
|
98
|
+
else
|
99
|
+
echo -e "The SUN java runtime environment and development kit."
|
100
|
+
fi
|
101
|
+
#elif [ "$sytem" = "Darwin" ] ; then
|
102
|
+
#else
|
103
|
+
|
104
|
+
fi
|
105
|
+
|
106
|
+
echo -e "\n$info If you add ~/.rvm/bin/ to your path you will be able to refer to installed ruby binaries using: <implementation>-<version>p<patchlevel>"
|
90
107
|
echo -e " For example: ~/.ruby-1.9.1p243 -e 'puts \"hello world\"' #=> hello world"
|
91
108
|
echo -e "$info Contact wayneeseguin on irc.freenod.net in #rvm for any questions / feedback."
|
92
|
-
echo -e " I
|
109
|
+
echo -e " I truly hope that you find rvm helpful! Thank you very much for using rvm. \n"
|
93
110
|
echo -e " ~ Wayne"
|
94
111
|
|
95
112
|
echo -e "$info To start using rvm see: \e[0;32m rvm usage\e[0m, Now close this login shell and open a new one."
|