rvm 0.0.87 → 0.0.88
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/VERSION.yml +1 -1
- data/rvm.gemspec +3 -3
- data/scripts/cli +28 -19
- data/scripts/libraries +12 -0
- data/scripts/{ruby-installer → manage} +60 -59
- data/scripts/rvm +0 -1
- data/scripts/utility +3 -3
- metadata +3 -3
data/lib/VERSION.yml
CHANGED
data/rvm.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{rvm}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.88"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Wayne E. Seguin"]
|
12
|
-
s.date = %q{2009-12-
|
12
|
+
s.date = %q{2009-12-04}
|
13
13
|
s.default_executable = %q{rvm-install}
|
14
14
|
s.description = %q{Manages Ruby interpreter installations and switching between them.}
|
15
15
|
s.email = %q{wayneeseguin@gmail.com}
|
@@ -50,10 +50,10 @@ Gem::Specification.new do |s|
|
|
50
50
|
"scripts/irbrc.rb",
|
51
51
|
"scripts/libraries",
|
52
52
|
"scripts/log",
|
53
|
+
"scripts/manage",
|
53
54
|
"scripts/match",
|
54
55
|
"scripts/monitor",
|
55
56
|
"scripts/notes",
|
56
|
-
"scripts/ruby-installer",
|
57
57
|
"scripts/rvm",
|
58
58
|
"scripts/rvm-install",
|
59
59
|
"scripts/selector",
|
data/scripts/cli
CHANGED
@@ -243,22 +243,22 @@ __rvm_parse_args() {
|
|
243
243
|
rvm_ruby_string="$rvm_token"
|
244
244
|
;;
|
245
245
|
|
246
|
-
--install) rvm_install_on_use_flag=1
|
247
|
-
-h|--help|usage|help) rvm_action=help
|
248
|
-
-G|--gems) rvm_gem_path="$1" ; shift
|
249
|
-
--source) rvm_src_path="$1" ; shift
|
250
|
-
--archives) rvm_archives_path="$1" ; shift
|
251
|
-
--make) rvm_ruby_make="$1" ; shift
|
252
|
-
--make-install) rvm_ruby_make_install="$1" ; shift
|
253
|
-
--nice) rvm_niceness="$1" ; shift
|
254
|
-
-l|--level) rvm_ruby_patch_level="p$1" ; shift
|
246
|
+
--install) rvm_install_on_use_flag=1 ;;
|
247
|
+
-h|--help|usage|help) rvm_action=help ;;
|
248
|
+
-G|--gems) rvm_gem_path="$1" ; shift ;;
|
249
|
+
--source) rvm_src_path="$1" ; shift ;;
|
250
|
+
--archives) rvm_archives_path="$1" ; shift ;;
|
251
|
+
--make) rvm_ruby_make="$1" ; shift ;;
|
252
|
+
--make-install) rvm_ruby_make_install="$1" ; shift ;;
|
253
|
+
--nice) rvm_niceness="$1" ; shift ;;
|
254
|
+
-l|--level) rvm_ruby_patch_level="p$1" ; shift ;;
|
255
255
|
# TODO: handle this below better (if $1 is null)
|
256
|
-
-m|--gem-set) rvm_gem_set_name="$1" ; shift
|
257
|
-
--sdk) rvm_sdk="$1" ; shift
|
258
|
-
--archflags) rvm_archflags="$1" ; shift
|
256
|
+
-m|--gem-set) rvm_gem_set_name="$1" ; shift ;;
|
257
|
+
--sdk) rvm_sdk="$1" ; shift ;;
|
258
|
+
--archflags) rvm_archflags="$1" ; shift ;;
|
259
259
|
|
260
|
-
tests|specs) rvm_action="tests"
|
261
|
-
--trace)
|
260
|
+
tests|specs) rvm_action="tests" ;;
|
261
|
+
--trace) export rvm_trace_flag=1 ; set -x ;;
|
262
262
|
|
263
263
|
--self|--gem|--rubygems|--reconfigure|--default|--debug|--force|--all|--dump|--summary|--jit|--latest|--yaml|--json|--archive|--shebang|--env|--path|--tail|--delete|--verbose)
|
264
264
|
eval "rvm_$(echo $rvm_token | sed 's#-##g')_flag=1"
|
@@ -335,7 +335,9 @@ __rvm_parse_args() {
|
|
335
335
|
}
|
336
336
|
|
337
337
|
rvm() {
|
338
|
-
|
338
|
+
if [[ -z "$ZSH_VERSION" ]] ; then
|
339
|
+
trap 'rm -rf "/tmp/rvm/$$" >/dev/null 2>&1' 0 1 2 3 15
|
340
|
+
fi
|
339
341
|
|
340
342
|
# Check that this is the current version.
|
341
343
|
disk_version=$(cat "${rvm_path:-$HOME/.rvm}/lib/VERSION.yml" | tail -n 3 | sed 's/^.*: //g' | tr "\n" '.' | sed 's/\.$//')
|
@@ -350,7 +352,6 @@ rvm() {
|
|
350
352
|
__rvm_load_defaults
|
351
353
|
__rvm_parse_args $@
|
352
354
|
|
353
|
-
if [[ -z "$rvm_trace_flag" ]] ; then set +x ; else set -x ; fi
|
354
355
|
result=0
|
355
356
|
case "$rvm_action" in
|
356
357
|
use) __rvm_use ; result=$? ;;
|
@@ -366,7 +367,6 @@ rvm() {
|
|
366
367
|
benchmark) __rvm_benchmark ; result=$? ;;
|
367
368
|
inspect) __rvm_inspect ; result=$? ;;
|
368
369
|
gems) __rvm_gems ; result=$? ;;
|
369
|
-
remove) __rvm_remove_ruby ; result=$? ;;
|
370
370
|
ruby|gem|rake) __rvm_do ; result=$? ;;
|
371
371
|
monitor)
|
372
372
|
export rvm_ruby_version rvm_ruby_string
|
@@ -374,7 +374,16 @@ rvm() {
|
|
374
374
|
;;
|
375
375
|
notes) $rvm_scripts_path/notes ; result=$? ;;
|
376
376
|
reload) rvm_reload_flag=1 ;;
|
377
|
-
fetch|install|uninstall)
|
377
|
+
fetch|install|uninstall|remove)
|
378
|
+
if [[ ! -z "$rvm_ruby_string" ]] ; then
|
379
|
+
$rvm_scripts_path/manage "$rvm_action" "$rvm_ruby_string"
|
380
|
+
elif $rvm_scripts_path/match "$rvm_ruby_version" "," ; then
|
381
|
+
$rvm_scripts_path/manage "$rvm_action" "$rvm_ruby_version"
|
382
|
+
else
|
383
|
+
$rvm_scripts_path/manage "$rvm_action"
|
384
|
+
fi
|
385
|
+
result=$?
|
386
|
+
;;
|
378
387
|
tests|specs) rvm_action="rake" ; __rvm_do ; result=$? ;;
|
379
388
|
|
380
389
|
iconv|openssl|ncurses|zlib|readline|curl)
|
@@ -405,7 +414,7 @@ rvm() {
|
|
405
414
|
|
406
415
|
if [[ "$rvm_reload_flag" -eq 1 ]] ; then source "$rvm_path/scripts/rvm" ; fi
|
407
416
|
|
408
|
-
if [[ "
|
417
|
+
if [[ "$rvm_trace_flag" -eq 1 ]] ; then set +x ; unset rvm_trace_flag ; fi
|
409
418
|
|
410
419
|
return $result
|
411
420
|
}
|
data/scripts/libraries
CHANGED
@@ -107,3 +107,15 @@ __rvm_ncurses_install() {
|
|
107
107
|
__rvm_pushpop
|
108
108
|
}
|
109
109
|
|
110
|
+
__rvm_install_llvm() {
|
111
|
+
builtin cd "$rvm_src_path"
|
112
|
+
if [[ ! -d "$rvm_src_path/llvm/.svn" ]] ; then
|
113
|
+
rm -rf "$rvm_src_path/llvm"
|
114
|
+
svn co -r 82747 https://llvm.org/svn/llvm-project/llvm/trunk llvm
|
115
|
+
builtin cd "$rvm_src_path/llvm"
|
116
|
+
./configure --enable-bindings=none
|
117
|
+
UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" ENABLE_OPTIMIZED=1 make -j2
|
118
|
+
sudo env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" ENABLE_OPTIMIZED=1 make install
|
119
|
+
fi
|
120
|
+
}
|
121
|
+
|
@@ -1,5 +1,14 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
|
+
if [[ "$rvm_trace_flag" -eq 1 ]] ; then set -x ; export rvm_trace_flag ; fi
|
4
|
+
|
5
|
+
original_ruby_version=$rvm_ruby_version
|
6
|
+
original_ruby_string=$rvm_ruby_string
|
7
|
+
|
8
|
+
source $rvm_scripts_path/rvm
|
9
|
+
|
10
|
+
trap "rm -f $rvm_path/$$* > /dev/null 2>&1 ; exit" 0 1 2 3 15
|
11
|
+
|
3
12
|
__rvm_install_source() {
|
4
13
|
if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select $* ; fi
|
5
14
|
$rvm_scripts_path/log "info" "Installing Ruby from source to: $rvm_ruby_home"
|
@@ -11,9 +20,6 @@ __rvm_install_source() {
|
|
11
20
|
__rvm_fetch_ruby
|
12
21
|
if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
|
13
22
|
|
14
|
-
__rvm_run "extract" "tar xzf $rvm_archives_path/$rvm_ruby_package_file.tar.gz -C $rvm_src_path" "Extracting $rvm_ruby_package_file ..."
|
15
|
-
if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
|
16
|
-
|
17
23
|
builtin cd $rvm_ruby_src_path
|
18
24
|
if [[ $? -gt 0 ]] ; then result=$? ; $rvm_scripts_path/log "error" "There was an error, please check $rvm_ruby_log_path/*.error.log" ; __rvm_pushpop ; return $result ; fi
|
19
25
|
|
@@ -288,6 +294,10 @@ RubyWrapper
|
|
288
294
|
;;
|
289
295
|
|
290
296
|
jruby)
|
297
|
+
if [[ -z "$(which java 2>/dev/null)" ]] ; then
|
298
|
+
echo -e "java must be installed and in your path in order to install JRuby." ; return 1
|
299
|
+
fi
|
300
|
+
|
291
301
|
mkdir -p "$rvm_ruby_log_path" "$rvm_ruby_src_path"
|
292
302
|
__rvm_pushpop $rvm_src_path
|
293
303
|
|
@@ -301,7 +311,7 @@ RubyWrapper
|
|
301
311
|
if [[ "$rvm_head_flag" -eq 1 ]] || [[ ! -z "$rvm_ruby_revision" ]] ; then ant dist ; fi
|
302
312
|
|
303
313
|
mkdir -p "$rvm_ruby_home/bin/"
|
304
|
-
builtin cd "$rvm_ruby_src_path/tool/nailgun" &&
|
314
|
+
__rvm_run "nailgun" "builtin cd "$rvm_ruby_src_path/tool/nailgun" && ./configure --prefix=$rvm_ruby_home && make $rvm_make_flags"
|
305
315
|
|
306
316
|
__rvm_pushpop
|
307
317
|
|
@@ -315,16 +325,10 @@ RubyWrapper
|
|
315
325
|
done ; unset binary
|
316
326
|
__rvm_pushpop
|
317
327
|
|
318
|
-
for binary in
|
319
|
-
__rvm_inject_ruby_shebang $rvm_ruby_home/bin/$binary
|
328
|
+
for binary in jrubyc jirb_swing jirb jgem rdoc ri spec autospec testrb ast generate_yaml_index.rb ; do
|
320
329
|
__rvm_inject_gem_env $rvm_ruby_home/bin/$binary
|
321
|
-
chmod +x $rvm_ruby_home/bin/$binary
|
322
330
|
done ; unset binary
|
323
331
|
|
324
|
-
for binary in jrubyc jirb_swing jirb jgem ; do
|
325
|
-
__rvm_inject_gem_env $rvm_ruby_home/bin/$binary
|
326
|
-
done
|
327
|
-
|
328
332
|
__rvm_rubygems_setup
|
329
333
|
__rvm_irbrc
|
330
334
|
__rvm_bin_script
|
@@ -412,45 +416,6 @@ RubyWrapper
|
|
412
416
|
if [[ ! -z "$ruby_options" ]] ; then RUBYOPT=$ruby_options ; export RUBYOPT ; fi
|
413
417
|
}
|
414
418
|
|
415
|
-
__rvm_manage_rubies() {
|
416
|
-
__rvm_state
|
417
|
-
rubies=() ; successes=() ; errors=() ; statuses=()
|
418
|
-
unset rvm_gem_set_name
|
419
|
-
rvm_ruby_gem_home=$(echo $rvm_ruby_gem_home | awk -F'%' '{print $1}')
|
420
|
-
rvm_ruby_string=$(echo $rvm_ruby_string | awk -F'%' '{print $1}')
|
421
|
-
# TODO: Extract the common functionality out of the if below
|
422
|
-
if [[ ! -z "$rvm_ruby_string" ]] ; then
|
423
|
-
unset rvm_ruby_interpreter rvm_ruby_version
|
424
|
-
__rvm_${rvm_action}_ruby
|
425
|
-
elif [[ ! -z "$rvm_ruby_version" ]] ;then
|
426
|
-
for rvm_ruby_string in $(echo $rvm_ruby_version | tr ',' ' ') ; do
|
427
|
-
eval "__rvm_${rvm_action}_ruby"
|
428
|
-
__rvm_unset_ruby_variables
|
429
|
-
done
|
430
|
-
elif [[ ! -z "$rvm_ruby_interpreter" ]] ; then
|
431
|
-
unset rvm_ruby_string rvm_ruby_version
|
432
|
-
eval "__rvm_${rvm_action}_ruby"
|
433
|
-
else # all
|
434
|
-
if [[ "$rvm_action" != "install" ]] ; then
|
435
|
-
while read -r bin_line
|
436
|
-
do # Keep this on second line damnit!
|
437
|
-
if [[ -x "$bin_line" ]] ; then
|
438
|
-
rvm_ruby_string="$(dirname "$bin_line" | xargs dirname | xargs basename)"
|
439
|
-
eval "__rvm_${rvm_action}_ruby"
|
440
|
-
__rvm_unset_ruby_variables
|
441
|
-
fi
|
442
|
-
done < <(\ls $rvm_path/*/bin/ruby 2> /dev/null)
|
443
|
-
else
|
444
|
-
$rvm_scripts_path/log "warn" 'Really? Install all? See "rvm list --all" and limit the selection to something more sane please :)'
|
445
|
-
fi
|
446
|
-
fi
|
447
|
-
__rvm_state
|
448
|
-
|
449
|
-
if [[ ! -z "$rvm_summary_flag" ]] ; then __rvm_summary ; fi
|
450
|
-
if [[ ! -z "$rvm_yaml_flag" ]] ; then __rvm_yaml ; fi
|
451
|
-
if [[ ! -z "$rvm_json_flag" ]] ; then __rvm_json ; fi
|
452
|
-
}
|
453
|
-
|
454
419
|
__rvm_fetch_ruby() {
|
455
420
|
if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select $* ; fi
|
456
421
|
|
@@ -470,6 +435,8 @@ __rvm_fetch_ruby() {
|
|
470
435
|
$rvm_scripts_path/log "info" "Downloading $rvm_ruby_package_file, this may take a while depending on your connection..."
|
471
436
|
$rvm_scripts_path/fetch "$rvm_url"
|
472
437
|
result=$? ; if [[ "$result" -gt 0 ]] ; then return $result ; fi
|
438
|
+
__rvm_run "extract" "tar xzf $rvm_archives_path/$rvm_ruby_package_file.tar.gz -C $rvm_src_path" "Extracting $rvm_ruby_package_file ..."
|
439
|
+
if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
|
473
440
|
fi
|
474
441
|
else
|
475
442
|
if [[ ! -z "$(echo $rvm_url | awk '/^git/')" ]] ; then
|
@@ -668,15 +635,49 @@ __rvm_actual_file() {
|
|
668
635
|
fi
|
669
636
|
}
|
670
637
|
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
638
|
+
__rvm_manage_rubies() {
|
639
|
+
#__rvm_state
|
640
|
+
rubies=() ; successes=() ; errors=() ; statuses=()
|
641
|
+
unset rvm_gem_set_name rvm_ruby_selected_flag
|
642
|
+
rvm_ruby_gem_home=$(echo $rvm_ruby_gem_home | awk -F'%' '{print $1}')
|
643
|
+
rvm_ruby_string=$(echo $rvm_ruby_string | awk -F'%' '{print $1}')
|
644
|
+
|
645
|
+
# TODO: Extract the common functionality out of the if below
|
646
|
+
#if [[ ! -z "$rvm_ruby_string" ]] ; then
|
647
|
+
# unset rvm_ruby_interpreter rvm_ruby_version
|
648
|
+
# eval "__rvm_${rvm_action}_ruby"
|
649
|
+
# __rvm_unset_ruby_variables
|
650
|
+
#elif [[ ! -z "$rvm_ruby_version" ]] ;then
|
651
|
+
if [[ ! -z "$rubies_string" ]] ;then
|
652
|
+
for rvm_ruby_string in $(echo $rubies_string | tr ',' ' ') ; do
|
653
|
+
eval "__rvm_${rvm_action}_ruby"
|
654
|
+
__rvm_unset_ruby_variables
|
655
|
+
done
|
656
|
+
#elif [[ ! -z "$rvm_ruby_interpreter" ]] ; then
|
657
|
+
# unset rvm_ruby_string rvm_ruby_version
|
658
|
+
# eval "__rvm_${rvm_action}_ruby"
|
659
|
+
# __rvm_unset_ruby_variables
|
660
|
+
else # all
|
661
|
+
if [[ "$rvm_action" != "install" ]] ; then
|
662
|
+
while read -r bin_line
|
663
|
+
do # Keep this on second line damnit!
|
664
|
+
if [[ -x "$bin_line" ]] ; then
|
665
|
+
rvm_ruby_string="$(dirname "$bin_line" | xargs dirname | xargs basename)"
|
666
|
+
eval "__rvm_${rvm_action}_ruby"
|
667
|
+
__rvm_unset_ruby_variables
|
668
|
+
fi
|
669
|
+
done < <(\ls $rvm_path/*/bin/ruby 2> /dev/null)
|
670
|
+
else
|
671
|
+
$rvm_scripts_path/log "warn" 'Really? Install all? See "rvm list --all" and limit the selection to something more sane please :)'
|
672
|
+
fi
|
680
673
|
fi
|
674
|
+
#__rvm_state
|
675
|
+
|
676
|
+
if [[ ! -z "$rvm_summary_flag" ]] ; then __rvm_summary ; fi
|
677
|
+
if [[ ! -z "$rvm_yaml_flag" ]] ; then __rvm_yaml ; fi
|
678
|
+
if [[ ! -z "$rvm_json_flag" ]] ; then __rvm_json ; fi
|
681
679
|
}
|
682
680
|
|
681
|
+
rvm_action="$1" ; rubies_string="$2"
|
682
|
+
__rvm_manage_rubies
|
683
|
+
exit $?
|
data/scripts/rvm
CHANGED
@@ -25,7 +25,6 @@ if [[ "$rvm_loaded_flag" != "1" ]] || [[ "$rvm_reload_flag" = "1" ]] ; then
|
|
25
25
|
source $rvm_path/scripts/initialize
|
26
26
|
source $rvm_path/scripts/utility
|
27
27
|
source $rvm_path/scripts/selector
|
28
|
-
source $rvm_path/scripts/ruby-installer # TODO: Script not function.
|
29
28
|
source $rvm_path/scripts/cli
|
30
29
|
source $rvm_path/scripts/gems
|
31
30
|
source $rvm_path/scripts/libraries
|
data/scripts/utility
CHANGED
@@ -656,7 +656,7 @@ __rvm_make_flags() {
|
|
656
656
|
PATH=${rvm_path}/usr/bin:$PATH ; export PATH
|
657
657
|
# This is only an issue with Darwin :/
|
658
658
|
if [[ "Darwin" = "$(uname)" ]] ; then
|
659
|
-
# ls /usr/lib/gcc/
|
659
|
+
# ls /usr/lib/gcc/x86_64-apple-darwin10
|
660
660
|
|
661
661
|
# Set the build & host type
|
662
662
|
if [[ "Power Macintosh" = "$(sysctl hw.machine | awk -F: '{print $2}' | sed 's/^ //')" ]] ; then
|
@@ -664,12 +664,12 @@ __rvm_make_flags() {
|
|
664
664
|
elif [[ $(sysctl hw.cpu64bit_capable | awk '{print $2}') = 1 ]] ; then # we could also use: sysctl hw.optional.x86_64
|
665
665
|
# 64 bit capable
|
666
666
|
if [[ "-arch x86_64" = "$rvm_archflags" ]] ; then
|
667
|
-
rvm_ruby_configure_flags="${rvm_ruby_configure_flags} --build=
|
667
|
+
rvm_ruby_configure_flags="${rvm_ruby_configure_flags} --build=x86_64-apple-darwin$(uname -r) --host=x86_64-apple-darwin$(uname -r)"
|
668
668
|
elif [[ "-arch i386" = "$rvm_archflags" ]] ; then
|
669
669
|
rvm_ruby_configure_flags="${rvm_ruby_configure_flags} --build=i386-apple-darwin$(uname -r) --host=i386-apple-darwin$(uname -r)"
|
670
670
|
else
|
671
671
|
rvm_archflags="-arch x86_64"
|
672
|
-
rvm_ruby_configure_flags="${rvm_ruby_configure_flags} --build=
|
672
|
+
rvm_ruby_configure_flags="${rvm_ruby_configure_flags} --build=x86_64-apple-darwin$(uname -r) --host=x86_64-apple-darwin$(uname -r)"
|
673
673
|
fi
|
674
674
|
else
|
675
675
|
# 32 bit capable only
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rvm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.88
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wayne E. Seguin
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-12-
|
12
|
+
date: 2009-12-04 00:00:00 -05:00
|
13
13
|
default_executable: rvm-install
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -54,10 +54,10 @@ files:
|
|
54
54
|
- scripts/irbrc.rb
|
55
55
|
- scripts/libraries
|
56
56
|
- scripts/log
|
57
|
+
- scripts/manage
|
57
58
|
- scripts/match
|
58
59
|
- scripts/monitor
|
59
60
|
- scripts/notes
|
60
|
-
- scripts/ruby-installer
|
61
61
|
- scripts/rvm
|
62
62
|
- scripts/rvm-install
|
63
63
|
- scripts/selector
|