wayneeseguin-rvm 0.0.29 → 0.0.30
Sign up to get free protection for your applications and to get access to all the features.
- data/rvm.gemspec +1 -1
- data/scripts/rvm +136 -95
- metadata +1 -1
data/rvm.gemspec
CHANGED
data/scripts/rvm
CHANGED
@@ -11,7 +11,7 @@ function __rvm_meta {
|
|
11
11
|
rvm_meta_author="Wayne E. Seguin"
|
12
12
|
rvm_meta_author_email="wayneeseguin@gmail.com"
|
13
13
|
rvm_meta_website="http://rvm.beginrescueend.com/"
|
14
|
-
rvm_meta_version="0.0.
|
14
|
+
rvm_meta_version="0.0.30"
|
15
15
|
rvm_meta_updated="2009.09.02"
|
16
16
|
}
|
17
17
|
|
@@ -59,37 +59,39 @@ function __rvm_usage {
|
|
59
59
|
|
60
60
|
Options:
|
61
61
|
|
62
|
-
-v|--version
|
63
|
-
-l|--level
|
64
|
-
-p|--prefix
|
65
|
-
|
66
|
-
-c|--configure
|
67
|
-
-a|--archives
|
68
|
-
-n|--nice
|
69
|
-
-m|--gem-set
|
70
|
-
--rm-gem-set
|
71
|
-
|
72
|
-
-l|--level
|
73
|
-
-t|--tag
|
74
|
-
-r|--rev
|
75
|
-
|
76
|
-
-P|--prefix
|
77
|
-
-B|--bin
|
78
|
-
-S|--source
|
79
|
-
-A|--archive
|
80
|
-
-G|--gems
|
81
|
-
-C|--configure
|
82
|
-
-M|--make
|
83
|
-
-I|--make-install - "
|
84
|
-
|
85
|
-
-n|--nice
|
86
|
-
-f|--file
|
87
|
-
-h|--help
|
88
|
-
-d|--default
|
89
|
-
-m|--gem-set
|
90
|
-
--rm-gem-set
|
91
|
-
--jit
|
92
|
-
--
|
62
|
+
-v|--version - Ruby Package Version, defaults to 'latest'
|
63
|
+
-l|--level - Patch level for the specified Ruby version
|
64
|
+
-p|--prefix - Package and source directory prefix, with trailing slash!
|
65
|
+
Default is a users home directory and /usr/local/ for root
|
66
|
+
-c|--configure - Options for source compile (default: --enable-shared)
|
67
|
+
-a|--archives - Directory to place downladed files into (~/.rvm/archives/)
|
68
|
+
-n|--nice - Niceness level (default: 0)
|
69
|
+
-m|--gem-set - Named gem set for switching between different gem sets
|
70
|
+
--rm-gem-set - Removes a named gemset.
|
71
|
+
|
72
|
+
-l|--level - Specify a patch level to use
|
73
|
+
-t|--tag -
|
74
|
+
-r|--rev - Specify the repository revision # to use or 'head' for
|
75
|
+
|
76
|
+
-P|--prefix - Sets the prefix path for installs to be installed to
|
77
|
+
-B|--bin - Specify path for binaries to be placed
|
78
|
+
-S|--source - Specify src directory to use
|
79
|
+
-A|--archive - Specify archive directory to use (tabralls / zips)
|
80
|
+
-G|--gems - Specify root gem path to use
|
81
|
+
-C|--configure - Specify custom configure options, comma separated
|
82
|
+
-M|--make - Specify a custom make command
|
83
|
+
-I|--make-install - " a custom make install command
|
84
|
+
|
85
|
+
-n|--nice - Specify a process niceness (for slow computers)
|
86
|
+
-f|--file - Specify a ruby file to run with 'rubydo' command
|
87
|
+
-h|--help - Emit this output and exit
|
88
|
+
-d|--default - Set the default Ruby to a specified version
|
89
|
+
-m|--gem-set - Use a named gem set instead of the default set.
|
90
|
+
--rm-gem-set - Remove a named gem set
|
91
|
+
--jit - Enable JIT for the Rubinius build
|
92
|
+
--force - Force install, removes old install & source directories.
|
93
|
+
--set-prompt - Set prompt to have the selected ruby prepended.
|
94
|
+
--debug|--trace - Toggle debug mode on for very verbose output.
|
93
95
|
|
94
96
|
Resources:
|
95
97
|
|
@@ -130,11 +132,16 @@ function __rvm_gems-install { for gem in $* ; do __rvm_gi $gem ; done }
|
|
130
132
|
function __rvm_set-defaults {
|
131
133
|
|
132
134
|
# TODO: Store defaults in "defaults/" dir.
|
133
|
-
if [ ! -
|
134
|
-
for variable in RUBY_VERSION GEM_HOME MY_RUBY_HOME PATH ; do
|
135
|
-
eval "export $variable"
|
135
|
+
if [ ! -s $rvm_install_path/default ] ; then
|
136
|
+
for variable in rvm_prompt RUBY_VERSION GEM_HOME MY_RUBY_HOME PATH ; do
|
136
137
|
eval value=\$${variable}
|
137
|
-
|
138
|
+
if [ -z "$value" ] ; then
|
139
|
+
echo "unset ${variable}" >> $rvm_install_path/default
|
140
|
+
else
|
141
|
+
eval "export $variable"
|
142
|
+
eval value=\$${variable}
|
143
|
+
echo "${variable}='$value' ; export ${variable}" >> $rvm_install_path/default
|
144
|
+
fi
|
138
145
|
done
|
139
146
|
fi
|
140
147
|
|
@@ -207,7 +214,8 @@ function __rvm_initialize {
|
|
207
214
|
rvm_ruby_repo_url="${rvm_ruby_repo_url:-"http://svn.ruby-lang.org/repos/ruby"}"
|
208
215
|
# Rubinius sha1's will be available after RC1.
|
209
216
|
rvm_rubinius_repo_url="${rvm_rubinius_repo_url:-"git://github.com/evanphx/rubinius.git"}"
|
210
|
-
rvm_macruby_repo_url="${rvm_macruby_repo_url:-"http://svn.macosforge.org/repository/ruby/MacRuby"}"
|
217
|
+
#rvm_macruby_repo_url="${rvm_macruby_repo_url:-"http://svn.macosforge.org/repository/ruby/MacRuby"}"
|
218
|
+
rvm_macruby_repo_url="${rvm_macruby_repo_url:-"git://github.com/masterkain/macruby.git"}"
|
211
219
|
rvm_jruby_repo_url="${rvm_jruby_repo_url:-"git://kenai.com/jruby~main"}"
|
212
220
|
|
213
221
|
__rvm_clean-path
|
@@ -216,7 +224,7 @@ function __rvm_initialize {
|
|
216
224
|
PATH=$rvm_bin_path:$PATH ; export PATH
|
217
225
|
fi
|
218
226
|
|
219
|
-
mkdir -p $rvm_source_path $
|
227
|
+
mkdir -p $rvm_source_path $rvm_bin_path $rvm_archives_path
|
220
228
|
}
|
221
229
|
|
222
230
|
function __rvm_curl {
|
@@ -236,18 +244,22 @@ function __rvm_install-source {
|
|
236
244
|
|
237
245
|
pushd $rvm_source_path > /dev/null
|
238
246
|
|
247
|
+
if [ ! -z "$rvm_force" ] ; then
|
248
|
+
rm -rf $rvm_install_path/$rvm_ruby_package_name
|
249
|
+
rm -rf $rvm_source_path/$rvm_ruby_package_name
|
250
|
+
fi
|
251
|
+
|
239
252
|
if [ -z "$rvm_ruby_tag" -a -z "$rvm_ruby_rev" ] ; then
|
240
253
|
if [ ! -d $rvm_source_path/$rvm_ruby_package_name ] ; then
|
241
254
|
rvm_url="${rvm_url:-"ftp://ftp.ruby-lang.org/pub/ruby/1.$rvm_major_version/$rvm_ruby_package_name.tar.gz"}"
|
242
255
|
__rvm_log "info" "\tDownloading $rvm_ruby_package_name, this may take a while depending on your connection..."
|
243
256
|
__rvm_curl $rvm_url
|
244
|
-
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$
|
257
|
+
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; fi
|
245
258
|
|
246
259
|
__rvm_log "info" "\tExtracting $rvm_ruby_package_name ..."
|
247
260
|
mkdir -p $rvm_source_path/$rvm_ruby_package_name
|
248
261
|
nice -n $rvm_niceness tar xzf $rvm_archives_path/$rvm_ruby_package_name.tar.gz -C $rvm_source_path
|
249
262
|
fi
|
250
|
-
cd $rvm_source_path/$rvm_ruby_package_name
|
251
263
|
else
|
252
264
|
if [ -z "$rvm_ruby_rev" ] ; then
|
253
265
|
# TODO: Check if tag v is valid
|
@@ -262,18 +274,36 @@ function __rvm_install-source {
|
|
262
274
|
rvm_rev="-r $rvm_ruby_rev"
|
263
275
|
fi
|
264
276
|
fi
|
277
|
+
|
265
278
|
__rvm_log "info" "\tRetrieving Ruby from $rvm_url"
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
279
|
+
if [ ! -z "`echo $rvm_url | grep '^git'`" ] ; then
|
280
|
+
if [ -d "$rvm_source_path/$rvm_ruby_package_name/.git" ] ; then
|
281
|
+
cd $rvm_source_path/$rvm_ruby_package_name
|
282
|
+
if [ -z "$rvm_ruby_rev" ] ; then
|
283
|
+
git pull origin master
|
284
|
+
else
|
285
|
+
git checkout ${rvm_ruby_rev:-HEAD}
|
286
|
+
fi
|
287
|
+
else
|
288
|
+
git clone --depth 1 $rvm_ruby_repo_url $rvm_source_path/$rvm_ruby_package_name
|
289
|
+
fi
|
290
|
+
else
|
291
|
+
if [ -d "$rvm_source_path/$rvm_ruby_package_name/.svn" ] ; then
|
292
|
+
cd $rvm_source_path/$rvm_ruby_package_name
|
293
|
+
svn checkout -q $rvm_rev
|
294
|
+
else
|
295
|
+
svn checkout -q $rvm_rev --force $rvm_url $rvm_source_path/$rvm_ruby_package_name
|
296
|
+
fi
|
297
|
+
fi
|
271
298
|
fi
|
272
|
-
|
299
|
+
cd $rvm_source_path/$rvm_ruby_package_name
|
300
|
+
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; fi
|
301
|
+
if [ ! -s $rvm_source_path/$rvm_ruby_package_name/Makefile -a "$rvm_ruby_interpreter" = "ruby" ] ; then autoconf ; fi
|
302
|
+
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; fi
|
273
303
|
if [ -s ./configure ] ; then
|
274
304
|
__rvm_log "info" "\tConfiguring $rvm_ruby_package_name using ${rvm_ruby_configure:-"--enable-shared"}, this may take a while depending on your cpu(s)..."
|
275
305
|
nice -n $rvm_niceness ./configure --prefix=$rvm_install_path/$rvm_ruby_package_name ${rvm_ruby_configure:-"--enable-shared"} > $rvm_log_path/$rvm_ruby_package_name/configure.log 2> $rvm_log_path/$rvm_ruby_package_name/configure.error.log
|
276
|
-
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$
|
306
|
+
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; fi
|
277
307
|
else
|
278
308
|
__rvm_log "warn" "\tSkipping configure step, ./configure file does not exist."
|
279
309
|
fi
|
@@ -284,18 +314,30 @@ function __rvm_install-source {
|
|
284
314
|
else
|
285
315
|
nice -n $rvm_niceness $rvm_ruby_make > $rvm_log_path/$rvm_ruby_package_name/install.log 2> $rvm_log_path/$rvm_ruby_package_name/install.error.log
|
286
316
|
fi
|
287
|
-
|
317
|
+
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; fi
|
288
318
|
if [ -z "$rvm_ruby_make" ] ; then
|
289
319
|
__rvm_log "info" "\tInstalling $rvm_ruby_package_name"
|
290
320
|
nice -n $rvm_niceness make install > $rvm_log_path/$rvm_ruby_package_name/install.log 2> $rvm_log_path/$rvm_ruby_package_name/install.error.log
|
291
321
|
else
|
292
322
|
nice -n $rvm_niceness $rvm_ruby_make_install > $rvm_log_path/$rvm_ruby_package_name/install.log 2> $rvm_log_path/$rvm_ruby_package_name/install.error.log
|
293
323
|
fi
|
294
|
-
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$
|
324
|
+
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; fi
|
295
325
|
|
296
326
|
chmod +x $rvm_install_path/$rvm_ruby_package_name/bin/*
|
297
327
|
|
298
|
-
|
328
|
+
ruby_wrapper=$(cat <<-RubyWrapper
|
329
|
+
#!/bin/bash
|
330
|
+
GEM_HOME=$rvm_gem_home ; export GEM_HOME
|
331
|
+
MY_RUBY_HOME=$rvm_ruby_home ; export MY_RUBY_HOME
|
332
|
+
PATH=$rvm_ruby_home/bin:$rvm_gem_home/bin:$rvm_default_path ; export PATH
|
333
|
+
|
334
|
+
exec "$rvm_ruby_binary" "\$@"
|
335
|
+
RubyWrapper
|
336
|
+
)
|
337
|
+
echo "$ruby_wrapper" > $rvm_bin_path/$rvm_ruby_package_name
|
338
|
+
unset ruby_wrapper
|
339
|
+
chmod +x $rvm_bin_path/$rvm_ruby_package_name
|
340
|
+
__rvm_log "info" "Installation of $rvm_ruby_package_name is complete."
|
299
341
|
|
300
342
|
__rvm_log "info" "\tInstalling rubygems dedicated to $rvm_ruby_package_name..."
|
301
343
|
rvm_gem_package_name="rubygems-1.3.5"
|
@@ -304,7 +346,7 @@ function __rvm_install-source {
|
|
304
346
|
cd $rvm_source_path/$rvm_gem_package_name
|
305
347
|
else
|
306
348
|
__rvm_curl $rvm_gem_url
|
307
|
-
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$
|
349
|
+
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; fi
|
308
350
|
mkdir -p $rvm_source_path/$rvm_gem_package_name
|
309
351
|
nice -n $rvm_niceness tar zxf $rvm_archives_path/$rvm_gem_package_name.tgz -C $rvm_source_path
|
310
352
|
fi
|
@@ -313,28 +355,28 @@ function __rvm_install-source {
|
|
313
355
|
|
314
356
|
nice -n $rvm_niceness $rvm_install_path/$rvm_ruby_package_name/bin/ruby $rvm_source_path/$rvm_gem_package_name/setup.rb > $rvm_log_path/$rvm_ruby_package_name/rubygems.install.log 2> $rvm_log_path/$rvm_ruby_package_name/rubygems.install.error.log
|
315
357
|
popd > /dev/null
|
316
|
-
|
358
|
+
|
359
|
+
for binary in gem irb erb ri rdoc testrb ; do
|
360
|
+
sed -i.orig "2i\\
|
361
|
+
ENV[\"GEM_HOME\"]=\"$rvm_gem_home\"
|
362
|
+
ENV[\"PATH\"]=\"$rvm_ruby_home/bin:$rvm_gem_home/bin:\"
|
363
|
+
|
364
|
+
" $rvm_install_path/$rvm_ruby_package_name/bin/$binary
|
365
|
+
done
|
366
|
+
|
367
|
+
__rvm_log "info" "Installation of rubygems for $rvm_ruby_package_name is complete."
|
317
368
|
|
318
369
|
for rvm_gem_name in rake ; do
|
319
370
|
__rvm_log "info" "Installing $rvm_gem_name"
|
320
371
|
nice -n $rvm_niceness $rvm_install_path/$rvm_ruby_package_name/bin/gem install $rvm_gem_name --no-rdoc --no-ri -q >> $rvm_log_path/$rvm_ruby_package_name/gems.install.log 2> $rvm_log_path/$rvm_ruby_package_name/gems.error.log
|
321
372
|
done
|
322
373
|
|
323
|
-
|
324
|
-
|
325
|
-
|
374
|
+
sed -i.orig "2i\\
|
375
|
+
ENV[\"GEM_HOME\"]=\"$rvm_gem_home\"
|
376
|
+
ENV[\"PATH\"]=\"$rvm_ruby_home/bin:$rvm_gem_home/bin:\"
|
326
377
|
|
327
|
-
|
328
|
-
MY_RUBY_HOME=$rvm_ruby_home ; export MY_RUBY_HOME
|
329
|
-
PATH=$rvm_ruby_home/bin:$rvm_gem_home/bin:$rvm_default_path ; export PATH
|
378
|
+
" $rvm_gem_home/bin/rake
|
330
379
|
|
331
|
-
exec "$rvm_ruby_binary" "\$@"
|
332
|
-
PassengerRuby
|
333
|
-
)
|
334
|
-
echo "$passenger_ruby" > $rvm_ruby_home/bin/passenger-$rvm_ruby_package_name
|
335
|
-
chmod +x $rvm_ruby_home/bin/passenger-$rvm_ruby_package_name
|
336
|
-
ln -fs $rvm_ruby_home/bin/passenger-$rvm_ruby_package_name $rvm_install_path/bin/passenger-$rvm_ruby_package_name
|
337
|
-
set +x
|
338
380
|
}
|
339
381
|
|
340
382
|
function __rvm_install-ruby {
|
@@ -349,28 +391,24 @@ function __rvm_install-ruby {
|
|
349
391
|
if [ "`uname`" = "Darwin" ] ; then
|
350
392
|
rvm_ruby_repo_url=$rvm_macruby_repo_url
|
351
393
|
rvm_ruby_configure=""
|
352
|
-
rvm_ruby_make="rake macruby:build"
|
353
|
-
rvm_ruby_make_install="rake install"
|
354
|
-
rvm_ruby_rev="head"
|
394
|
+
rvm_ruby_make="rake macruby:build framework_instdir=$rvm_install_path/macruby-head framework_name=/macruby-head --trace"
|
395
|
+
rvm_ruby_make_install="rake framework:install framework_instdir=$rvm_install_path/macruby-head framework_name=/macruby-head --trace"
|
396
|
+
rvm_ruby_rev="${rvm_ruby_rev:-head}" # Hard coding this for now
|
397
|
+
|
355
398
|
DESTDIR="$rvm_install_path/$rvm_ruby_package_name" ; export DESTDIR
|
356
399
|
if [ -z "$rvm_ruby_rev" ] ; then
|
357
400
|
# TODO: Check if tag v is valid
|
358
|
-
|
401
|
+
rvm_ruby_repo_url=$rvm_ruby_repo_url/tags/$rvm_ruby_tag
|
359
402
|
rvm_ruby_rev=""
|
360
403
|
else
|
361
404
|
if [ "$rvm_ruby_rev" = "head" -o "$rvm_ruby_rev" = "trunk" ] ; then
|
362
|
-
|
405
|
+
rvm_ruby_repo_url=$rvm_ruby_repo_url/trunk
|
363
406
|
rvm_ruby_rev=""
|
364
407
|
else
|
365
|
-
|
408
|
+
rvm_ruby_repo_url=$rvm_ruby_repo_url/trunk
|
366
409
|
rvm_ruby_rev="-r $rvm_ruby_rev"
|
367
410
|
fi
|
368
411
|
fi
|
369
|
-
__rvm_log "info" "\tRetrieving MacRuby from $rvm_url"
|
370
|
-
#mkdir -p $rvm_source_path/$rvm_ruby_package_name
|
371
|
-
# TODO: Instead of always forcing, check if it's already svn for correct url and simply check out required revision
|
372
|
-
#svn checkout -q $rvm_rev --force $rvm_url $rvm_source_path/$rvm_ruby_package_name
|
373
|
-
cd $rvm_source_path/$rvm_ruby_package_name
|
374
412
|
__rvm_install-source
|
375
413
|
unset DESTDIR
|
376
414
|
else
|
@@ -387,19 +425,19 @@ function __rvm_install-ruby {
|
|
387
425
|
else
|
388
426
|
__rvm_log "info" "\tDownloading $rvm_ruby_package_name, this may take a while depending on your connection..."
|
389
427
|
__rvm_curl $rvm_url
|
390
|
-
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$
|
428
|
+
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; fi
|
391
429
|
__rvm_log "info" "\tExtracting $rvm_ruby_package_name..."
|
392
430
|
mkdir -p $rvm_source_path/$rvm_ruby_package_name
|
393
431
|
nice -n $rvm_niceness tar xzf $rvm_archives_path/$rvm_ruby_package_name.tar.gz -C $rvm_source_path
|
394
432
|
fi
|
395
|
-
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$
|
433
|
+
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; fi
|
396
434
|
|
397
435
|
__rvm_log "info" "\tInstalling $rvm_ruby_package_name, this may take a while, depending on your cpu(s)..."
|
398
436
|
mkdir -p $rvm_log_path/$rvm_ruby_package_name
|
399
437
|
|
400
438
|
cd $rvm_source_path/$rvm_ruby_package_name
|
401
439
|
nice -n $rvm_niceness ./installer -a $rvm_install_path/ruby-enterprise-$rvm_ruby_version-$rvm_ruby_patch_level --dont-install-useful-gems --no-tcmalloc > $rvm_log_path/$rvm_ruby_package_name/install.log 2> $rvm_log_path/$rvm_ruby_package_name/install.error.log
|
402
|
-
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$
|
440
|
+
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; fi
|
403
441
|
chmod +x $rvm_install_path/$rvm_ruby_package_name/bin/*
|
404
442
|
|
405
443
|
ln -fs $rvm_install_path/$rvm_ruby_package_name/bin/ruby $rvm_install_path/bin/$rvm_ruby_package_name
|
@@ -411,11 +449,11 @@ function __rvm_install-ruby {
|
|
411
449
|
cd $rvm_source_path/$rvm_gem_package_name
|
412
450
|
else
|
413
451
|
__rvm_curl $rvm_gem_url
|
414
|
-
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$
|
452
|
+
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; fi
|
415
453
|
mkdir -p $rvm_source_path/$rvm_gem_package_name
|
416
454
|
nice -n $rvm_niceness tar zxf $rvm_archives_path/$rvm_gem_package_name.tgz -C $rvm_source_path
|
417
455
|
fi
|
418
|
-
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$
|
456
|
+
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; fi
|
419
457
|
# Well this is fun... fix nil error on require_paths:
|
420
458
|
sed -i.orig "s/require_paths\.join/require_paths.to_a.join/" $rvm_source_path/$rvm_gem_package_name/lib/rubygems/gem_path_searcher.rb > $rvm_log_path/$rvm_ruby_package_name/rubygems.install.log 2> $rvm_log_path/$rvm_ruby_package_name/rubygems.install.error.log
|
421
459
|
|
@@ -429,7 +467,7 @@ function __rvm_install-ruby {
|
|
429
467
|
done
|
430
468
|
;;
|
431
469
|
|
432
|
-
|
470
|
+
rbx|rubinius)
|
433
471
|
rvm_ruby_repo_url=$rvm_rubinius_repo_url
|
434
472
|
rvm_ruby_configure=""
|
435
473
|
rvm_ruby_make="rake"
|
@@ -441,13 +479,13 @@ function __rvm_install-ruby {
|
|
441
479
|
git clone --depth 1 $rvm_ruby_repo_url $rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version
|
442
480
|
fi
|
443
481
|
cd $rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version && $rvm_rubinius_jit rake build
|
444
|
-
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$
|
482
|
+
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; fi
|
445
483
|
for binary in ruby irb ; do
|
446
484
|
ln -fs $rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version/bin/rbx $rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version/bin/$binary
|
447
485
|
done
|
448
|
-
|
486
|
+
;;
|
449
487
|
|
450
|
-
|
488
|
+
jruby)
|
451
489
|
rvm_package_file="$rvm_ruby_interpreter-bin-$rvm_ruby_version"
|
452
490
|
rvm_url="http://dist.codehaus.org/$rvm_ruby_interpreter/$rvm_ruby_version/$rvm_package_file.zip"
|
453
491
|
rvm_jruby_repo_url="${rvm_jruby_repo_url:-"git://kenai.com/jruby~main"}"
|
@@ -473,12 +511,12 @@ function __rvm_install-ruby {
|
|
473
511
|
cd $rvm_source_path/$rvm_ruby_package_name
|
474
512
|
fi
|
475
513
|
fi
|
476
|
-
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$
|
514
|
+
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; fi
|
477
515
|
|
478
516
|
__rvm_log "info" "\tInstalling $rvm_ruby_package_name..."
|
479
517
|
mkdir -p $rvm_install_path/$rvm_ruby_package_name/bin/
|
480
518
|
rsync -ag $rvm_source_path/$rvm_ruby_package_name/ $rvm_install_path/$rvm_ruby_package_name/
|
481
|
-
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$
|
519
|
+
if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; fi
|
482
520
|
cd $rvm_source_path/$rvm_ruby_package_name/tool/nailgun && make > $rvm_log_path/$rvm_ruby_package_name/install.nailgun.log 2> $rvm_log_path/$rvm_ruby_package_name/install.error.nailgun.log
|
483
521
|
popd > /dev/null
|
484
522
|
chmod +x $rvm_install_path/$rvm_ruby_package_name/bin/*
|
@@ -501,6 +539,7 @@ function __rvm_install-ruby {
|
|
501
539
|
default)
|
502
540
|
__rvm_log "fail" "please specify a ruby implementation to install."
|
503
541
|
;;
|
542
|
+
|
504
543
|
*) __rvm_log "fail" "Ruby implementation '$rvm_ruby_interpreter' is not known."
|
505
544
|
|
506
545
|
esac
|
@@ -599,7 +638,7 @@ function __rvm_select {
|
|
599
638
|
rvm_ruby_patch_level="${rvm_ruby_patch_level:-preview1}"
|
600
639
|
|
601
640
|
elif [ "$rvm_ruby_version" = "1.8.6" ] ; then
|
602
|
-
rvm_ruby_patch_level="${rvm_ruby_patch_level:-
|
641
|
+
rvm_ruby_patch_level="${rvm_ruby_patch_level:-p383}"
|
603
642
|
|
604
643
|
elif [ "$rvm_ruby_version" = "1.8.7" ] ; then
|
605
644
|
rvm_ruby_patch_level="${rvm_ruby_patch_level:-p174}"
|
@@ -707,7 +746,7 @@ Config
|
|
707
746
|
fi
|
708
747
|
echo "$rvm_irbrc_file" >> $rvm_ruby_home/.irbrc
|
709
748
|
fi
|
710
|
-
PATH=$MY_RUBY_HOME/bin:$GEM_HOME/bin:$rvm_default_path ; export PATH
|
749
|
+
PATH=$MY_RUBY_HOME/bin:$GEM_HOME/bin:$rvm_install_path/bin:$rvm_default_path ; export PATH
|
711
750
|
|
712
751
|
rvm_prompt="$rvm_ruby_package_name" ; export rvm_prompt
|
713
752
|
if [ ! -z "$rvm_set_prompt" -a ! -z "$PS1" ] ; then
|
@@ -718,9 +757,9 @@ Config
|
|
718
757
|
RUBY_VERSION="$($MY_RUBY_HOME/bin/ruby -v | sed 's/^\(.*\) (.*$/\1/')"
|
719
758
|
export GEM_HOME MY_RUBY_HOME RUBY_VERSION
|
720
759
|
|
721
|
-
echo "PATH=$MY_RUBY_HOME/bin:$GEM_HOME/bin:$rvm_default_path ; export PATH" > $rvm_install_path/current
|
760
|
+
echo "PATH=$MY_RUBY_HOME/bin:$GEM_HOME/bin:$rvm_install_path/bin:$rvm_default_path ; export PATH" > $rvm_install_path/current
|
722
761
|
|
723
|
-
for variable in RUBY_VERSION GEM_HOME MY_RUBY_HOME ; do
|
762
|
+
for variable in rvm_prompt RUBY_VERSION GEM_HOME MY_RUBY_HOME ; do
|
724
763
|
eval "export $variable"
|
725
764
|
eval value=\$${variable}
|
726
765
|
echo "${variable}='$value' ; export ${variable}" >> $rvm_install_path/current
|
@@ -733,7 +772,7 @@ function __rvm_symlinks {
|
|
733
772
|
|
734
773
|
mkdir -p ${rvm_install_path}/bin
|
735
774
|
for release in `/bin/ls $rvm_install_path | grep 'ruby-'` ; do
|
736
|
-
for binary in
|
775
|
+
for binary in irb gem rdoc ri erb ; do
|
737
776
|
if [ -x $rvm_install_path/$release/bin/$binary ] ; then
|
738
777
|
ln -fs $rvm_install_path/$release/bin/$binary $rvm_install_path/bin/$binary-${release#ruby-}
|
739
778
|
fi
|
@@ -753,7 +792,7 @@ function __rvm_list {
|
|
753
792
|
|
754
793
|
function __rvm_reset {
|
755
794
|
|
756
|
-
PATH="$rvm_default_path" ; export PATH
|
795
|
+
PATH="$rvm_install_path/bin:$rvm_default_path" ; export PATH
|
757
796
|
for variable in RUBY_VERSION GEM_HOME MY_RUBY_HOME rvm_prompt ; do unset $variable ; done
|
758
797
|
rm -f $rvm_install_path/default*
|
759
798
|
rm -f $rvm_install_path/current
|
@@ -862,7 +901,7 @@ function __rvm_cache {
|
|
862
901
|
}
|
863
902
|
|
864
903
|
function __rvm_cleanup-variables {
|
865
|
-
unset rvm_selected rvm_action rvm_ruby_interpreter rvm_ruby_patch_level rvm_ruby_version rvm_irbrc_file rvm_ruby_irbrc rvm_source_path rvm_install_path rvm_debug rvm_prefix_path rvm_ruby_package_name rvm_gem_path rvm_command rvm_error_message IRBRC rvm_ruby_home rvm_ruby_binary rvm_gem_set_name rvm_delete_flag rvm_ruby_tag rvm_ruby_rev rvm_url rvm_ruby_make rvm_ruby_make_install rvm_config_path
|
904
|
+
unset rvm_selected rvm_action rvm_ruby_interpreter rvm_ruby_patch_level rvm_ruby_version rvm_irbrc_file rvm_ruby_irbrc rvm_source_path rvm_install_path rvm_debug rvm_prefix_path rvm_ruby_package_name rvm_gem_path rvm_command rvm_error_message IRBRC rvm_ruby_home rvm_ruby_binary rvm_gem_set_name rvm_delete_flag rvm_ruby_tag rvm_ruby_rev rvm_url rvm_ruby_make rvm_ruby_make_install rvm_config_path rvm_bin_path rvm_force rvm_set_prompt
|
866
905
|
}
|
867
906
|
|
868
907
|
function __rvm_get-user-defaults {
|
@@ -985,7 +1024,9 @@ function __rvm_parse-args {
|
|
985
1024
|
-f|--file) rvm_ruby_args="$1" ; shift ;;
|
986
1025
|
-h|--help) rvm_action=help ; shift ;;
|
987
1026
|
-d|--default) rvm_set_default=1 ;;
|
988
|
-
--debug)
|
1027
|
+
--trace|--debug) rvm_debug=1 ;;
|
1028
|
+
--force) rvm_force=1 ;;
|
1029
|
+
--set-prompt) rvm_set_prompt=1 ;;
|
989
1030
|
-m|--gem-set) rvm_gem_set_name="$1" ; shift ;;
|
990
1031
|
--rm-gem-set) rvm_gem_set_name_rm="$1" ; shift ;;
|
991
1032
|
--jit) rvm_rubinius_jit="RBX_LLVM=1" ;;
|