rvm 0.0.48 → 0.0.49
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/bin/rvm-install +1 -1
- data/config/db +2 -0
- data/{scripts/rvm-update → install} +58 -57
- data/lib/VERSION.yml +1 -1
- data/rvm.gemspec +13 -12
- data/scripts/{rvm-aliases → aliases} +0 -0
- data/scripts/{rvm-cli → cli} +17 -12
- data/scripts/{rvm-completion → completion} +1 -16
- data/scripts/{rvm-functions → functions} +0 -0
- data/scripts/install +173 -0
- data/scripts/{rvm-ruby-installer → ruby-installer} +91 -66
- data/scripts/rvm +4 -4
- data/scripts/rvm-install +58 -57
- data/scripts/{rvm-selector → selector} +31 -5
- data/scripts/update +173 -0
- data/scripts/{rvm-utility → utility} +77 -58
- metadata +12 -11
- data/INSTALL +0 -1
@@ -2,8 +2,6 @@
|
|
2
2
|
|
3
3
|
function __rvm_install_source {
|
4
4
|
if [ -z "$rvm_selected" ] ; then __rvm_select $* ; fi
|
5
|
-
|
6
|
-
result=0
|
7
5
|
__rvm_log "info" "Installing Ruby from source to: $rvm_ruby_home"
|
8
6
|
mkdir -p $rvm_ruby_log_path
|
9
7
|
|
@@ -14,6 +12,7 @@ function __rvm_install_source {
|
|
14
12
|
rm -rf $rvm_ruby_src_path
|
15
13
|
fi
|
16
14
|
|
15
|
+
result=0
|
17
16
|
if [ -z "$rvm_ruby_tag" -a -z "$rvm_ruby_rev" ] ; then
|
18
17
|
if [ ! -d $rvm_ruby_src_path ] ; then
|
19
18
|
rvm_url="${rvm_url:-"ftp://ftp.ruby-lang.org/pub/ruby/1.$rvm_major_version/$rvm_ruby_package_name.tar.gz"}"
|
@@ -27,7 +26,7 @@ function __rvm_install_source {
|
|
27
26
|
fi
|
28
27
|
else
|
29
28
|
__rvm_log "info" "Retrieving Ruby from $rvm_url"
|
30
|
-
if [ ! -z "`echo $rvm_url |
|
29
|
+
if [ ! -z "`echo $rvm_url | awk '/^git/'`" ] ; then
|
31
30
|
if [ -d "$rvm_ruby_src_path/.git" ] ; then
|
32
31
|
cd $rvm_ruby_src_path
|
33
32
|
if [ -z "$rvm_ruby_rev" ] ; then
|
@@ -73,10 +72,10 @@ function __rvm_install_source {
|
|
73
72
|
cd $rvm_ruby_src_path
|
74
73
|
if [ $? -gt 0 ] ; then result=$? ; __rvm_log "error" "There was an error, please check $rvm_ruby_log_path/*.error.log" ; __rvm_pushpop ; return $result ; fi
|
75
74
|
|
76
|
-
if [ ! -s "$rvm_ruby_src_path/configure"
|
75
|
+
if [ ! -s "$rvm_ruby_src_path/configure" ] ; then
|
77
76
|
rvm_autoconf=`which autoconf`
|
78
77
|
if [ $? -gt 0 ] ; then __rvm_log "fail" "rvm expects autoconf" ; result=$? ; return $result ; fi
|
79
|
-
__rvm_run "autoconf" $rvm_autoconf
|
78
|
+
__rvm_run "autoconf" "$rvm_autoconf"
|
80
79
|
if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
|
81
80
|
fi
|
82
81
|
|
@@ -99,17 +98,17 @@ function __rvm_install_source {
|
|
99
98
|
|
100
99
|
__rvm_log "info" "Compiling $rvm_ruby_package_name, this may take a while, depending on your cpu(s)..."
|
101
100
|
if [ -z "$rvm_ruby_make" ] ; then
|
102
|
-
__rvm_run "make" make $rvm_make_flags
|
101
|
+
__rvm_run "make" "/usr/bin/make $rvm_make_flags"
|
103
102
|
else
|
104
|
-
__rvm_run "make" $rvm_ruby_make $rvm_make_flags
|
103
|
+
__rvm_run "make" "$rvm_ruby_make $rvm_make_flags"
|
105
104
|
fi
|
106
105
|
if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
|
107
106
|
|
108
107
|
if [ -z "$rvm_ruby_make" ] ; then
|
109
108
|
__rvm_log "info" "Installing $rvm_ruby_package_name"
|
110
|
-
__rvm_run "install" make install
|
109
|
+
__rvm_run "install" "/usr/bin/make install"
|
111
110
|
else
|
112
|
-
__rvm_run "install" $rvm_ruby_make_install
|
111
|
+
__rvm_run "install" "$rvm_ruby_make_install"
|
113
112
|
fi
|
114
113
|
if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
|
115
114
|
|
@@ -127,8 +126,9 @@ function __rvm_install_source {
|
|
127
126
|
|
128
127
|
function __rvm_install_ruby {
|
129
128
|
|
130
|
-
if [ -z "$rvm_selected" ]
|
131
|
-
if [ ! -z "$RUBYOPT" ]
|
129
|
+
if [ -z "$rvm_selected" ] ; then __rvm_select $* ; fi
|
130
|
+
if [ ! -z "$RUBYOPT" ] ; then ruby_options=$RUBYOPT ; unset RUBYOPT ; fi
|
131
|
+
if [ "`uname`" = "Darwin" ] ; then ARCHFLAGS="-arch x86_64 -arch i386" ; export ARCHFLAGS ; fi
|
132
132
|
|
133
133
|
case "$rvm_ruby_interpreter" in
|
134
134
|
|
@@ -169,48 +169,60 @@ function __rvm_install_ruby {
|
|
169
169
|
;;
|
170
170
|
|
171
171
|
ruby-enterprise|ree)
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
__rvm_log "info" "Installing $rvm_ruby_package_name, this may take a while, depending on your cpu(s)..."
|
188
|
-
mkdir -p $rvm_ruby_log_path
|
172
|
+
if [ "$rvm_ruby_version" = "1.8.6" -a -z "$rvm_head_flag" ] ; then
|
173
|
+
rvm_url="http://rubyforge.org/frs/download.php/58677/$rvm_ruby_package_name.tar.gz"
|
174
|
+
__rvm_log "info" "Installing Ruby Enterprise Edition from source to: $rvm_ruby_home"
|
175
|
+
__rvm_pushpop $rvm_source_path
|
176
|
+
if [ -d $rvm_ruby_src_path ] ; then
|
177
|
+
cd $rvm_ruby_src_path
|
178
|
+
else
|
179
|
+
__rvm_log "info" "Downloading $rvm_ruby_package_name, this may take a while depending on your connection..."
|
180
|
+
__rvm_fetch $rvm_url
|
181
|
+
if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
|
182
|
+
__rvm_log "info" "Extracting $rvm_ruby_package_name..."
|
183
|
+
mkdir -p $rvm_ruby_src_path
|
184
|
+
__rvm_run "extract" tar xzf $rvm_archives_path/$rvm_ruby_package_name.tar.gz -C $rvm_source_path
|
185
|
+
if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
|
186
|
+
fi
|
189
187
|
|
190
|
-
|
191
|
-
|
192
|
-
if [ ! -z "$rvm_ruby_configure" ] ; then rvm_ruby_configure="-c $rvm_ruby_configure"; fi
|
193
|
-
__rvm_run "install" ./installer -a $rvm_path/ruby-enterprise-$rvm_ruby_version-$rvm_ruby_patch_level --dont-install-useful-gems --no-tcmalloc $rvm_ruby_configure
|
194
|
-
if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
|
195
|
-
chmod +x $rvm_ruby_home/bin/*
|
188
|
+
__rvm_log "info" "Installing $rvm_ruby_package_name, this may take a while, depending on your cpu(s)..."
|
189
|
+
mkdir -p $rvm_ruby_log_path
|
196
190
|
|
197
|
-
|
191
|
+
cd $rvm_ruby_src_path
|
192
|
+
mkdir -p $rvm_ruby_home/lib/ruby/gems/1.8/gems
|
193
|
+
if [ ! -z "$rvm_ruby_configure" ] ; then rvm_ruby_configure="-c $rvm_ruby_configure"; fi
|
194
|
+
__rvm_run "install" ./installer -a $rvm_path/ruby-enterprise-$rvm_ruby_version-$rvm_ruby_patch_level --dont-install-useful-gems --no-tcmalloc $rvm_ruby_configure
|
195
|
+
if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
|
196
|
+
chmod +x $rvm_ruby_home/bin/*
|
198
197
|
|
199
|
-
|
200
|
-
__rvm_log "info" "Installing $rvm_gem_name"
|
201
|
-
__rvm_run "gems" $rvm_ruby_home/bin/gem install $rvm_gem_name --no-rdoc --no-ri -q
|
202
|
-
done
|
198
|
+
__rvm_rubygems_setup
|
203
199
|
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
200
|
+
for rvm_gem_name in rake ; do
|
201
|
+
__rvm_log "info" "Installing $rvm_gem_name"
|
202
|
+
__rvm_run "gems" $rvm_ruby_home/bin/gem install $rvm_gem_name --no-rdoc --no-ri -q
|
203
|
+
done
|
204
|
+
__rvm_irbrc
|
205
|
+
__rvm_bin_scripts
|
206
|
+
__rvm_post_install
|
207
|
+
__rvm_pushpop
|
208
|
+
else
|
209
|
+
rvm_url=`__rvm_db "ree_${rvm_ruby_version}_repo_url"`
|
210
|
+
if [ -z "$rvm_url" ] ; then
|
211
|
+
__rvm_log "fail" "rvm does not know the rvm repo url for 'ree_${rvm_ruby_version}'"
|
212
|
+
result=1
|
213
|
+
else
|
214
|
+
rvm_ruby_repo_url=$rvm_url
|
215
|
+
#rvm_ruby_configure="--enable-shared --enable-pthread $rvm_ruby_configure "
|
216
|
+
__rvm_install_source $*
|
217
|
+
fi
|
218
|
+
fi
|
208
219
|
;;
|
209
220
|
|
210
221
|
rbx|rubinius)
|
211
222
|
unset GEM_HOME GEM_PATH MY_RUBY_HOME IRBRC
|
212
223
|
PATH=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
|
213
224
|
PATH=$rvm_bin_path:$PATH ; export PATH
|
225
|
+
|
214
226
|
rvm_ruby_repo_url=$rvm_rubinius_repo_url
|
215
227
|
rvm_ruby_configure=""
|
216
228
|
rvm_ruby_src_path=$rvm_ruby_home
|
@@ -229,12 +241,11 @@ function __rvm_install_ruby {
|
|
229
241
|
# prereqs, 1.8.6 w/ParseTree & rake. Yes this could all be one line... not pushing our luck.
|
230
242
|
echo `rvm install 1.8.6` # This should install if missing.
|
231
243
|
echo `rvm 1.8.6 -m rbx ; gem install --no-rdoc --no-ri rake ParseTree` # This should install if missing.
|
232
|
-
rake186rbx=`rvm 1.8.6 -m rbx ; which rake`
|
233
244
|
if [ ! -z "$rvm_jit_flag" ]; then
|
234
|
-
__rvm_run "build" RBX_LLVM=1
|
245
|
+
__rvm_run "build" "\`rvm 1.8.6 -m rbx ; RBX_LLVM=1 rake build\`"
|
235
246
|
else
|
236
|
-
__rvm_run "build"
|
237
|
-
fi
|
247
|
+
__rvm_run "build" "\`rvm 1.8.6 -m rbx ; rake build\`"
|
248
|
+
fi
|
238
249
|
|
239
250
|
for binary in ruby irb ; do
|
240
251
|
ln -fs $rvm_ruby_home/bin/rbx $rvm_ruby_home/bin/$binary
|
@@ -253,7 +264,8 @@ PATH="$rvm_ruby_home/bin:$rvm_gem_home/bin:\$PATH" ; export PATH
|
|
253
264
|
exec $rvm_ruby_home/bin/rbx -S $binary_name "\$@"
|
254
265
|
RubyWrapper
|
255
266
|
)
|
256
|
-
|
267
|
+
rm -f $rvm_path/bin/$binary-$rvm_ruby_package_name
|
268
|
+
for file_name in $rvm_path/bin/$binary-$rvm_ruby_package_name $rvm_ruby_home/bin/$binary ; do
|
257
269
|
echo "$ruby_wrapper" > $file_name
|
258
270
|
if [ -f $file_name ] ; then chmod +x $file_name ; fi
|
259
271
|
done
|
@@ -298,39 +310,43 @@ RubyWrapper
|
|
298
310
|
fi
|
299
311
|
fi
|
300
312
|
|
301
|
-
for binary in jirb jruby jgem ; do
|
302
|
-
cp -f $rvm_ruby_src_path/bin/$binary $rvm_ruby_src_path/bin/${binary#j}
|
303
|
-
done ; unset binary
|
304
|
-
|
305
313
|
__rvm_log "info" "Installing $rvm_ruby_package_name..."
|
306
314
|
mkdir -p $rvm_ruby_home/bin/
|
307
|
-
__rvm_run "nailgun" "cd $rvm_ruby_src_path/tool/nailgun && make $rvm_make_flags"
|
315
|
+
__rvm_run "nailgun" "cd $rvm_ruby_src_path/tool/nailgun && /usr/bin/make $rvm_make_flags"
|
308
316
|
__rvm_pushpop
|
309
|
-
chmod +x $rvm_ruby_home/bin/*
|
310
317
|
|
311
318
|
if [ -z "$rvm_ruby_home" -o "$rvm_ruby_home" = "/" ] ; then echo "WTH?!?! rvm_ruby_home == / ??? not removing." ; return 1000000 ; fi
|
312
319
|
rm -rf $rvm_ruby_home
|
313
320
|
__rvm_run "sync" "/bin/cp -Rf $rvm_ruby_src_path $rvm_ruby_home"
|
314
321
|
|
315
|
-
|
322
|
+
__rvm_pushpop $rvm_ruby_home/bin/
|
323
|
+
for binary in jirb jruby jgem ; do
|
324
|
+
ln -nfs $binary ${binary#j}
|
325
|
+
done ; unset binary
|
326
|
+
__rvm_pushpop
|
327
|
+
|
328
|
+
for binary in rake rdoc ri spec autospec \
|
329
|
+
testrb jrubyc jirb_swing jirb jgem ast generate_yaml_index.rb; do
|
316
330
|
__rvm_inject_ruby_shebang $rvm_ruby_home/bin/$binary
|
317
331
|
__rvm_inject_gem_env $rvm_ruby_home/bin/$binary
|
318
332
|
chmod +x $rvm_ruby_home/bin/$binary
|
319
333
|
done ; unset binary
|
320
|
-
|
334
|
+
|
335
|
+
__rvm_inject_gem_env $rvm_ruby_home/bin/gem # Ensure the env is set properly for gem.
|
336
|
+
|
321
337
|
__rvm_irbrc
|
322
338
|
__rvm_bin_script
|
339
|
+
__rvm_use
|
323
340
|
|
324
341
|
for rvm_gem_name in jruby-openssl ; do
|
325
342
|
__rvm_log "info" "Installing $rvm_gem_name"
|
326
343
|
__rvm_run "gems" $rvm_ruby_home/bin/gem install $rvm_gem_name --no-rdoc --no-ri -q
|
327
344
|
done ; unset rvm_gem_name
|
328
|
-
|
329
345
|
;;
|
330
346
|
|
331
347
|
ruby)
|
332
348
|
# Merge configure options with user specified options
|
333
|
-
rvm_ruby_configure="--enable-shared
|
349
|
+
rvm_ruby_configure="--enable-shared --enable-pthread $rvm_ruby_configure "
|
334
350
|
if [ "`uname`" = "Darwin" ] ; then ARCHFLAGS="-arch x86_64 -arch i386" ; export ARCHFLAGS ; fi
|
335
351
|
__rvm_install_source $*
|
336
352
|
;;
|
@@ -347,6 +363,7 @@ RubyWrapper
|
|
347
363
|
}
|
348
364
|
|
349
365
|
function __rvm_manage_rubies {
|
366
|
+
__rvm_state
|
350
367
|
rubies=() ; successes=() ; errors=() ; statuses=()
|
351
368
|
# TODO: Extract the common functionality out of the if below
|
352
369
|
if [ ! -z "$rvm_ruby_string" ] ; then
|
@@ -363,7 +380,7 @@ function __rvm_manage_rubies {
|
|
363
380
|
__rvm_${rvm_action}_ruby
|
364
381
|
else # all
|
365
382
|
if [ "$rvm_action" != "install" ] ; then
|
366
|
-
while read bin_line
|
383
|
+
while read bin_line
|
367
384
|
do # Keep this on second line damnit!
|
368
385
|
if [ -x $bin_line ] ; then
|
369
386
|
rvm_ruby_string="`dirname $bin_line | xargs dirname | xargs basename`"
|
@@ -371,8 +388,11 @@ function __rvm_manage_rubies {
|
|
371
388
|
__rvm_unset_ruby_variables
|
372
389
|
fi
|
373
390
|
done < <(/bin/ls $rvm_path/*/bin/ruby 2> /dev/null)
|
391
|
+
else
|
392
|
+
__rvm_log "warn" "Really? Install all? See 'rvm list --all' and limit the selection to something more sane please :)"
|
374
393
|
fi
|
375
394
|
fi
|
395
|
+
__rvm_state
|
376
396
|
|
377
397
|
if [ ! -z "$rvm_summary_flag" ] ; then __rvm_summary ; fi
|
378
398
|
if [ ! -z "$rvm_yaml_flag" ] ; then __rvm_yaml ; fi
|
@@ -455,7 +475,17 @@ function __rvm_post_install {
|
|
455
475
|
}
|
456
476
|
|
457
477
|
function __rvm_rubygems_setup {
|
458
|
-
if [ -z "`echo $rvm_ruby_version | awk '/^1\.9/'`" ] ; then
|
478
|
+
if [ ! -z "`echo $rvm_ruby_version | awk '/^1\.9/'`" ] ; then
|
479
|
+
# 1.9 has it's own built-in gem command
|
480
|
+
__rvm_inject_ruby_shebang "$rvm_ruby_src_path/bin/gem"
|
481
|
+
cp $rvm_ruby_src_path/bin/gem $rvm_ruby_home/bin/gem
|
482
|
+
__rvm_run "rubygems.update" $rvm_ruby_home/bin/gem update --system
|
483
|
+
elif [ ! -z "`echo $rvm_ruby_interpreter | awk '/^jruby/'`" ] ; then
|
484
|
+
# jruby has it's own built-in gem command
|
485
|
+
__rvm_inject_ruby_shebang "$rvm_ruby_src_path/bin/gem"
|
486
|
+
cp $rvm_ruby_src_path/bin/gem $rvm_ruby_home/bin/gem
|
487
|
+
__rvm_run "rubygems.update" $rvm_ruby_home/bin/gem update --system
|
488
|
+
else
|
459
489
|
__rvm_log "info" "Installing rubygems dedicated to $rvm_ruby_package_name..."
|
460
490
|
rvm_gem_package_name="rubygems-1.3.5"
|
461
491
|
rvm_gem_url="http://rubyforge.org/frs/download.php/60718/$rvm_gem_package_name.tgz"
|
@@ -472,11 +502,6 @@ function __rvm_rubygems_setup {
|
|
472
502
|
__rvm_log "info" "Installation of rubygems $rvm_ruby_package_name completed successfully."
|
473
503
|
fi
|
474
504
|
__rvm_inject_ruby_shebang "$rvm_ruby_home/bin/gem"
|
475
|
-
else
|
476
|
-
# 1.9 has it's own built-in gem command
|
477
|
-
__rvm_inject_ruby_shebang "$rvm_ruby_src_path/bin/gem"
|
478
|
-
cp $rvm_ruby_src_path/bin/gem $rvm_ruby_home/bin/gem
|
479
|
-
__rvm_run "rubygems.update" $rvm_ruby_home/bin/gem update --system
|
480
505
|
fi
|
481
506
|
return $result
|
482
507
|
}
|
@@ -484,7 +509,7 @@ function __rvm_rubygems_setup {
|
|
484
509
|
function __rvm_inject_ruby_shebang {
|
485
510
|
__rvm_actual_file $1
|
486
511
|
if [ -f $actual_file ] ; then
|
487
|
-
sed -i.orig -e "s
|
512
|
+
sed -i.orig -e "s=env [j]*ruby=env $rvm_ruby_home/bin/ruby=" $actual_file
|
488
513
|
rm -f $actual_file.orig ; chmod +x $actual_file
|
489
514
|
fi ; unset actual_file
|
490
515
|
}
|
data/scripts/rvm
CHANGED
@@ -9,10 +9,10 @@
|
|
9
9
|
if [ -s ~/.rvmrc ] ; then source ~/.rvmrc ; fi
|
10
10
|
eval rvm_path="${rvm_path:-~/.rvm}"
|
11
11
|
|
12
|
-
source $rvm_path/scripts/
|
13
|
-
source $rvm_path/scripts/
|
14
|
-
source $rvm_path/scripts/
|
15
|
-
source $rvm_path/scripts/
|
12
|
+
source $rvm_path/scripts/utility
|
13
|
+
source $rvm_path/scripts/selector
|
14
|
+
source $rvm_path/scripts/ruby-installer # TODO: Script not function.
|
15
|
+
source $rvm_path/scripts/cli
|
16
16
|
|
17
17
|
if [ -f $rvm_path/default ] ; then source $rvm_path/default ; fi
|
18
18
|
|
data/scripts/rvm-install
CHANGED
@@ -33,62 +33,63 @@ done ; unset file_name
|
|
33
33
|
|
34
34
|
results=$(grep 'scripts/rvm' ~/.bash_profile ~/.bashrc ~/.zshrc > /dev/null)
|
35
35
|
if [ $? -gt 0 ] ; then
|
36
|
-
|
37
|
-
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')? "
|
38
|
-
read response
|
39
|
-
if [ "${response:0:1}" = "s" ] ; then
|
40
|
-
echo 'w00t!'
|
41
|
-
break
|
42
|
-
elif [ "${response:0:1}" = "m" ] ; then
|
43
|
-
echo -e " Please make sure that this line is in place."
|
44
|
-
break
|
45
|
-
fi
|
46
|
-
done
|
47
|
-
|
48
|
-
if [ "${response:0:1}" = "s" ] ; then
|
49
|
-
|
36
|
+
if [ ! -z "`echo $PS1`" ] ; then
|
50
37
|
while : ; do
|
51
|
-
echo -n -e "$question Do you
|
38
|
+
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')? "
|
52
39
|
read response
|
53
|
-
if [ "${response:0:1}" = "
|
54
|
-
|
40
|
+
if [ "${response:0:1}" = "s" ] ; then
|
41
|
+
echo 'w00t!'
|
55
42
|
break
|
56
|
-
elif [ "${response:0:1}" = "
|
57
|
-
|
58
|
-
break
|
59
|
-
elif [ "${response:0:1}" = "o" ] ; then
|
60
|
-
user_shell="both"
|
43
|
+
elif [ "${response:0:1}" = "m" ] ; then
|
44
|
+
echo -e " Please make sure that this line is in place."
|
61
45
|
break
|
62
46
|
fi
|
63
47
|
done
|
64
48
|
|
65
|
-
if [ "$
|
49
|
+
if [ "${response:0:1}" = "s" ] ; then
|
66
50
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
51
|
+
while : ; do
|
52
|
+
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)? "
|
53
|
+
read response
|
54
|
+
if [ "${response:0:1}" = "a" ] ; then
|
55
|
+
user_shell="bash"
|
56
|
+
break
|
57
|
+
elif [ "${response:0:1}" = "z" ] ; then
|
58
|
+
user_shell="zsh"
|
59
|
+
break
|
60
|
+
elif [ "${response:0:1}" = "o" ] ; then
|
61
|
+
user_shell="both"
|
62
|
+
break
|
63
|
+
fi
|
64
|
+
done
|
65
|
+
fi
|
66
|
+
else
|
67
|
+
user_shell="both"
|
68
|
+
fi
|
79
69
|
|
70
|
+
if [ "$user_shell" = "bash" -o "$user_shell" = "both" ] ; then
|
71
|
+
touch ~/.bash_profile
|
72
|
+
if [ -z "`grep '\.rvm/scripts/rvm' ~/.bash_profile`" ] ; then
|
73
|
+
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/.bash_profile."
|
74
|
+
echo -e "\n" >> ~/.bash_profile
|
75
|
+
echo "if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi" >> ~/.bash_profile
|
76
|
+
fi
|
77
|
+
touch ~/.bashrc
|
78
|
+
if [ -z "`grep '\.rvm/scripts/rvm' ~/.bashrc`" ] ; then
|
79
|
+
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/.bashrc."
|
80
|
+
echo -e "\n" >> ~/.bashrc
|
81
|
+
echo "if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi" >> ~/.bashrc
|
80
82
|
fi
|
81
83
|
|
82
|
-
|
84
|
+
fi
|
83
85
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
fi
|
86
|
+
if [ "$user_shell" = "zsh" -o "$user_shell" = "both" ] ; then
|
87
|
+
touch ~/.zshrc
|
88
|
+
if [ -z "`grep '\.rvm/scripts/rvm' ~/.zshrc`" ] ; then
|
89
|
+
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/.zshrc."
|
90
|
+
echo -e "\n" >> ~/.zshrc
|
91
|
+
echo "if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi" >> ~/.zshrc
|
90
92
|
fi
|
91
|
-
|
92
93
|
fi
|
93
94
|
fi
|
94
95
|
|
@@ -132,30 +133,30 @@ if [ "$system" = "Linux" ] ; then
|
|
132
133
|
rvm_yum_binary=`which yum 2> /dev/null`
|
133
134
|
|
134
135
|
if [ ! -z "$rvm_apt_get_binary" ] ; then
|
135
|
-
echo -e "
|
136
|
-
echo -e "
|
137
|
-
echo -e "
|
138
|
-
echo -e "
|
136
|
+
echo -e " $item For jRuby (if you wish to use it) you will need:"
|
137
|
+
echo -e " $ sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk"
|
138
|
+
echo -e " $item For ree (if you wish to use it) you will need:"
|
139
|
+
echo -e " $ sudo apt-get install libreadline5-dev libssl-dev bison"
|
139
140
|
|
140
141
|
elif [ ! -z "$rvm_emerge_binary" ] ; then
|
141
|
-
echo -e "
|
142
|
-
echo -e "
|
142
|
+
echo -e " $item For jRuby (if you wish to use it) you will need:"
|
143
|
+
echo -e " $ sudo emerge dev-java/sun-jdk dev-java/sun-jre-bin"
|
143
144
|
|
144
145
|
elif [ ! -z "$rvm_pacman_binary" ] ; then
|
145
|
-
echo -e "
|
146
|
-
echo -e "
|
146
|
+
echo -e " $item For jRuby (if you wish to use it) you will need:"
|
147
|
+
echo -e " $ sudo pacman -Sy jdk jre"
|
147
148
|
|
148
149
|
elif [ ! -z "$rvm_yum_binary" ] ; then
|
149
|
-
echo -e "
|
150
|
-
echo -e "
|
150
|
+
echo -e " $item For ree (if you wish to use it) you will need:"
|
151
|
+
echo -e " $ yum install -y rpm-build gcc gcc-c++ redhat-rpm-config ; then download and rpmbuild and install the sdk, Have fun..."
|
151
152
|
|
152
153
|
else
|
153
|
-
echo -e "
|
154
|
-
echo -e "
|
154
|
+
echo -e " $item For jRuby (if you wish to use it) you will need:"
|
155
|
+
echo -e " The SUN java runtime environment and development kit."
|
155
156
|
fi
|
156
157
|
elif [ "$system" = "Darwin" ] ; then
|
157
|
-
echo -e "
|
158
|
-
echo -e "
|
158
|
+
echo -e " $item Be sure that you have XCode Tools installed in order to use rvm."
|
159
|
+
echo -e " $item If you intend on installing MacRuby you must install LLVM first."
|
159
160
|
fi
|
160
161
|
|
161
162
|
echo -e " $item In order to use rvm the following line must occur in your shell's loading files, after all path/variable settings.:"
|