rvm 0.0.57 → 0.0.58
Sign up to get free protection for your applications and to get access to all the features.
- data/install +32 -32
- data/lib/VERSION.yml +1 -1
- data/rvm.gemspec +2 -2
- data/scripts/cli +28 -28
- data/scripts/completion +2 -4
- data/scripts/gems +5 -5
- data/scripts/install +32 -32
- data/scripts/ruby-installer +30 -31
- data/scripts/rvm-install +32 -32
- data/scripts/selector +20 -20
- data/scripts/update +32 -32
- data/scripts/utility +54 -55
- metadata +2 -2
data/scripts/utility
CHANGED
@@ -8,11 +8,11 @@ system:
|
|
8
8
|
uname: "$(uname -a)"
|
9
9
|
|
10
10
|
ruby:
|
11
|
-
interpreter: "
|
12
|
-
version: "
|
13
|
-
date: "
|
14
|
-
platform: "
|
15
|
-
patchlevel: "
|
11
|
+
interpreter: "$(echo $full_version | awk '{print $1}')"
|
12
|
+
version: "$(echo $full_version | awk '{print $2}')"
|
13
|
+
date: "$(echo $full_version | sed 's/^.*(\([0-9]\{4\}\(-[0-9][0-9]\)\{2\}\).*$/\1/')"
|
14
|
+
platform: "$(echo $full_version | sed 's/^.*\[//' | sed 's/\].*$//')"
|
15
|
+
patchlevel: "$(echo $full_version | sed 's/^.*(//' | sed 's/).*$//')"
|
16
16
|
full_version: "$full_version"
|
17
17
|
|
18
18
|
homes:
|
@@ -20,10 +20,10 @@ homes:
|
|
20
20
|
ruby: "${MY_RUBY_HOME:-'not set'}"
|
21
21
|
|
22
22
|
binaries:
|
23
|
-
ruby: "
|
24
|
-
irb: "
|
25
|
-
gem: "
|
26
|
-
rake: "
|
23
|
+
ruby: "$(which ruby)"
|
24
|
+
irb: "$(which irb)"
|
25
|
+
gem: "$(which gem)"
|
26
|
+
rake: "$(which rake)"
|
27
27
|
|
28
28
|
environment:
|
29
29
|
GEM_HOME: "$GEM_HOME"
|
@@ -64,13 +64,13 @@ function __rvm_log {
|
|
64
64
|
case "$level" in
|
65
65
|
debug) shift ;
|
66
66
|
if [ ! -z "$rvm_debug_flag" ] ; then
|
67
|
-
echo -e "
|
67
|
+
echo -e "$(tput setaf 5)<d>$(tput sgr0) $message $(tput setaf 5)</d> $(tput sgr0) "
|
68
68
|
fi
|
69
69
|
;;
|
70
|
-
info) shift ; echo -e "
|
71
|
-
warn) shift ; echo -e "
|
72
|
-
error) shift ; echo -e "
|
73
|
-
fail) shift ; echo -e "
|
70
|
+
info) shift ; echo -e "$(tput setaf 2)<i>$(tput sgr0) $message $(tput setaf 2)</i> $(tput sgr0) " ;;
|
71
|
+
warn) shift ; echo -e "$(tput setaf 3)<w>$(tput sgr0) $message $(tput setaf 3)</w> $(tput sgr0) " ;;
|
72
|
+
error) shift ; echo -e "$(tput setaf 1)<e>$(tput sgr0) $message $(tput setaf 1)</e> $(tput sgr0) " ;;
|
73
|
+
fail) shift ; echo -e "$(tput setaf 1)<f>$(tput sgr0) $message $(tput setaf 1)</f> $(tput sgr0) " ; __rvm_pushpop ; return 1 ;;
|
74
74
|
*) echo -e "$message"
|
75
75
|
esac
|
76
76
|
}
|
@@ -105,10 +105,10 @@ function __rvm_run {
|
|
105
105
|
__rvm_log "debug" "Executing: $command"
|
106
106
|
touch "$rvm_ruby_log_path/$log_file_name.log" "$rvm_ruby_log_path/$log_file_name.error.log" # for zsh :(
|
107
107
|
echo "[$(date +'%Y-%m-%d %H:%M:%S')] $command" | tee "$rvm_ruby_log_path/$log_file_name.log" > "$rvm_ruby_log_path/$log_file_name.error.log"
|
108
|
-
if [ -z "$rvm_niceness" -o "
|
108
|
+
if [ -z "$rvm_niceness" -o "0" = "$rvm_niceness" ] ; then
|
109
109
|
eval "$command" >> "$rvm_ruby_log_path/$log_file_name.log" 2>> "$rvm_ruby_log_path/$log_file_name.error.log"
|
110
110
|
else
|
111
|
-
eval "nice -n $rvm_niceness
|
111
|
+
eval "nice -n $rvm_niceness \$($command)" >> $rvm_ruby_log_path/$log_file_name.log 2>> $rvm_ruby_log_path/$log_file_name.error.log
|
112
112
|
fi
|
113
113
|
if [ $? -gt 0 ] ; then __rvm_log "error" "Error running '$command', please check $rvm_ruby_log_path/$log_file_name.error.log" ; __rvm_pushpop ; return 1 ; fi
|
114
114
|
unset log_file command
|
@@ -273,8 +273,8 @@ function __rvm_implode {
|
|
273
273
|
while : ; do
|
274
274
|
__rvm_log "warn" "Are you SURE you wish for rvm to implode? This will remove $rvm_path ? (type 'yes' or 'no')"
|
275
275
|
read response
|
276
|
-
if [ "
|
277
|
-
if [ "
|
276
|
+
if [ "yes" = "$response" ] ; then
|
277
|
+
if [ "/" = "$rvm_path" ] ; then
|
278
278
|
__rvm_log "error" "remove '/' ?!... NO!"
|
279
279
|
else
|
280
280
|
if [ -d $rvm_path ] ; then
|
@@ -286,7 +286,7 @@ function __rvm_implode {
|
|
286
286
|
fi
|
287
287
|
fi
|
288
288
|
break
|
289
|
-
elif [ "
|
289
|
+
elif [ "no" = "$response" ] ; then
|
290
290
|
__rvm_log "info" "Cancelling implosion, no harm done :)"
|
291
291
|
break
|
292
292
|
fi
|
@@ -313,12 +313,12 @@ function __rvm_source_dir {
|
|
313
313
|
function __rvm_gemdup {
|
314
314
|
if [ -z "$rvm_selected_flag" ] ; then __rvm_select $* ; fi
|
315
315
|
__rvm_log "debug" "$rvm_ruby_interpreter"
|
316
|
-
if [ "
|
316
|
+
if [ "default" = "$rvm_ruby_interpreter" ] ; then
|
317
317
|
# TODO: ~/.rvm/default first, then system user
|
318
318
|
rvm_source_gem_path="$rvm_system_user_gem_path"
|
319
|
-
elif [ "
|
319
|
+
elif [ "user" = "$rvm_ruby_interpreter" ] ; then
|
320
320
|
rvm_source_gem_path="$rvm_system_user_gem_path"
|
321
|
-
elif [ "
|
321
|
+
elif [ "system" = "$rvm_ruby_interpreter" ] ; then
|
322
322
|
rvm_source_gem_path="$rvm_system_gem_path"
|
323
323
|
else
|
324
324
|
# TODO: use selector for this?
|
@@ -354,7 +354,7 @@ function __rvm_db {
|
|
354
354
|
__rvm_log "fail" "__rvm_db must be called with at least one argument: __rvm_db key [value]"
|
355
355
|
else
|
356
356
|
value="$*"
|
357
|
-
if [ "
|
357
|
+
if [ "unset" = "$value" -o "delete" = "$value" ] ; then
|
358
358
|
sed -i.tmp "s/^$key=.*$//" $rvm_hash_file
|
359
359
|
else
|
360
360
|
if [ -z "$value" ] ; then # get
|
@@ -381,7 +381,7 @@ function __rvm_list {
|
|
381
381
|
echo -e "\nruby:\n"
|
382
382
|
for version in $(/bin/ls -l $rvm_path/ 2> /dev/null | awk '/ ruby-[1-2].*/ { print $NF }') ; do
|
383
383
|
string=$($rvm_path/$version/bin/ruby -v)
|
384
|
-
if [ "$
|
384
|
+
if [[ "$version" = "$current_ruby" ]] ; then
|
385
385
|
echo -e "=> $version : $string"
|
386
386
|
selected="1"
|
387
387
|
else
|
@@ -392,7 +392,7 @@ function __rvm_list {
|
|
392
392
|
echo -e "\njruby:\n"
|
393
393
|
for version in $(/bin/ls -l $rvm_path/ 2> /dev/null | awk '/jruby-.*/ { print $NF }') ; do
|
394
394
|
string=$($rvm_path/$version/bin/ruby -v)
|
395
|
-
if [ "$
|
395
|
+
if [[ "$version" = "$current_ruby" ]] ; then
|
396
396
|
echo -e "=> $version : $string"
|
397
397
|
selected="1"
|
398
398
|
else
|
@@ -403,7 +403,7 @@ function __rvm_list {
|
|
403
403
|
echo -e "\nree:\n"
|
404
404
|
for version in $(/bin/ls $rvm_path/ 2> /dev/null | awk '/ree-.*/ { print $NF }') ; do
|
405
405
|
string="$($rvm_path/$version/bin/ruby -v | tr "\n" ' ' )"
|
406
|
-
if [ "$
|
406
|
+
if [[ "$version" = "$current_ruby" ]] ; then
|
407
407
|
echo -e "=> $version : $string"
|
408
408
|
selected="1"
|
409
409
|
else
|
@@ -416,7 +416,7 @@ function __rvm_list {
|
|
416
416
|
if [ ! -z "$version" ] ; then
|
417
417
|
echo -e "\ndefault:\n"
|
418
418
|
string=$($rvm_path/$version/bin/ruby -v)
|
419
|
-
if [ "$
|
419
|
+
if [[ "$version" = "$current_ruby" ]] ; then
|
420
420
|
echo -e "=> $version : $string"
|
421
421
|
selected="1"
|
422
422
|
else
|
@@ -428,7 +428,7 @@ function __rvm_list {
|
|
428
428
|
echo -e "\nsystem:\n"
|
429
429
|
system_version=$(rvm system ; ruby -v 2> /dev/null)
|
430
430
|
if [ ! -z "$system_version" ] ; then
|
431
|
-
if [ "$($(which ruby) -v)" = "$system_version" ] ; then
|
431
|
+
if [[ "$($(which ruby) -v)" = "$system_version" ]] ; then
|
432
432
|
echo -e "=> $system_version\n"
|
433
433
|
else
|
434
434
|
echo -e " $system_version\n"
|
@@ -446,7 +446,7 @@ function __rvm_initialize {
|
|
446
446
|
fi
|
447
447
|
|
448
448
|
# TODO: Sanitize user input, ensure that there is a / a the end...
|
449
|
-
if [ "
|
449
|
+
if [ "root" = "$(whoami)" ] ; then
|
450
450
|
__rvm_log "fail" "root user support is not yet implemented."
|
451
451
|
rvm_prefix_path="${rvm_prefix_path:-/usr/local/}"
|
452
452
|
else
|
@@ -472,7 +472,7 @@ function __rvm_initialize {
|
|
472
472
|
rvm_ruby_load_path="."
|
473
473
|
rvm_ruby_require=""
|
474
474
|
|
475
|
-
if [ "
|
475
|
+
if [ "Darwin" = "$(uname)" ] ; then rvm_archflags="${rvm_archflags:-'-arch i386 -arch x86_64'}" ; fi
|
476
476
|
|
477
477
|
__rvm_clean-path
|
478
478
|
rvm_result=$(echo $PATH | grep 'rvm\/bin:')
|
@@ -484,7 +484,7 @@ function __rvm_initialize {
|
|
484
484
|
}
|
485
485
|
|
486
486
|
function __rvm_update {
|
487
|
-
if [ "
|
487
|
+
if [ "head" = "$rvm_ruby_revision" -o ! -z "$rvm_self_flag" -o "update" = "$rvm_action" -o ! -z "$rvm_update_flag" ] ; then
|
488
488
|
__rvm_version
|
489
489
|
__rvm_update_rvm
|
490
490
|
__rvm_version
|
@@ -497,7 +497,7 @@ function __rvm_update {
|
|
497
497
|
|
498
498
|
function __rvm_update_rvm {
|
499
499
|
mkdir -p $rvm_src_path
|
500
|
-
if [ "
|
500
|
+
if [ "head" = "$rvm_ruby_revision" ] ; then
|
501
501
|
if [ -d $rvm_src_path/rvm/.git ] ; then
|
502
502
|
cd $rvm_src_path/rvm/ && git pull origin master && ./scripts/install
|
503
503
|
else
|
@@ -513,11 +513,11 @@ function __rvm_update_rvm {
|
|
513
513
|
function __rvm_reboot {
|
514
514
|
__rvm_log "warn" "Do you wish to reset rvm? ('yes', or 'no')"
|
515
515
|
read response
|
516
|
-
if [ "
|
516
|
+
if [ "yes" = "$response" ] ; then
|
517
517
|
cd
|
518
518
|
__rvm_reset
|
519
519
|
mv ~/.rvm/archives ~/.archives
|
520
|
-
if [ "
|
520
|
+
if [ "/" = "$rvm_path" ] ; then
|
521
521
|
__rvm_log "error" "remove '/' ?!... NO!"
|
522
522
|
else
|
523
523
|
if [ -d $rvm_path ] ; then
|
@@ -548,10 +548,10 @@ function __rvm_reload {
|
|
548
548
|
function __rvm_ruby_do {
|
549
549
|
__rvm_select
|
550
550
|
__rvm_use
|
551
|
-
binary
|
551
|
+
binary="$(echo $rvm_action | sed 's/do$//')"
|
552
552
|
if [ -x $rvm_ruby_home/bin/$binary ] ; then
|
553
553
|
load_path="$rvm_ruby_home/bin:$rvm_ruby_load_path"
|
554
|
-
if [ "
|
554
|
+
if [ "ruby" = "$binary" ] ; then
|
555
555
|
if [ -z "$(echo $rvm_ruby_args | awk '/\.rb$/')" ] ; then
|
556
556
|
rvm_ruby_args="-S $rvm_ruby_args"
|
557
557
|
fi
|
@@ -591,7 +591,7 @@ function __rvm_do {
|
|
591
591
|
unset rvm_ruby_interpreter rvm_ruby_version
|
592
592
|
__rvm_ruby_do
|
593
593
|
elif [ ! -z "$rvm_ruby_version" ] ;then
|
594
|
-
for rvm_ruby_selector in
|
594
|
+
for rvm_ruby_selector in $(echo $rvm_ruby_version | tr ',' ' ') ; do
|
595
595
|
unset rvm_ruby_string
|
596
596
|
__rvm_ruby_do
|
597
597
|
done
|
@@ -602,7 +602,7 @@ function __rvm_do {
|
|
602
602
|
while read bin_line
|
603
603
|
do # Keep this on second line damnit!
|
604
604
|
if [ -x $bin_line ] ; then
|
605
|
-
rvm_ruby_string="
|
605
|
+
rvm_ruby_string="$(dirname $bin_line | xargs dirname | xargs basename)"
|
606
606
|
__rvm_ruby_do
|
607
607
|
fi
|
608
608
|
done < <(/bin/ls $rvm_path/*/bin/ruby 2> /dev/null)
|
@@ -723,10 +723,10 @@ function __rvm_pushpop {
|
|
723
723
|
|
724
724
|
function __rvm_state {
|
725
725
|
if [ -z "$rvm_state" ] ; then
|
726
|
-
if [ -z "$(which ruby | awk
|
726
|
+
if [ -z "$(which ruby | awk /$(basename $rvm_path)/)" ] ; then
|
727
727
|
rvm_state=system
|
728
728
|
else
|
729
|
-
rvm_state="$(dirname
|
729
|
+
rvm_state="$(dirname $(which ruby) | xargs dirname | xargs basename)"
|
730
730
|
fi
|
731
731
|
else
|
732
732
|
rvm_ruby_string="$rvm_state"
|
@@ -760,7 +760,7 @@ function __rvm_readline_install {
|
|
760
760
|
__rvm_fetch "ftp://ftp.gnu.org/gnu/readline/$package-$version.$archive_format"
|
761
761
|
__rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format"
|
762
762
|
cd "$rvm_src_path/$package-$version"
|
763
|
-
if [ "
|
763
|
+
if [ "Darwin" = "$(uname)" ] ; then
|
764
764
|
sdk=$(ls -t /Developer/SDKs/ | head -n 1)
|
765
765
|
CFLAGS="-isysroot /Developer/SDKs/$sdk -arch i386 -arch x86_64"
|
766
766
|
LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/$sdk -arch i386 -arch x86_64"
|
@@ -788,19 +788,18 @@ function __rvm_iconv_install {
|
|
788
788
|
}
|
789
789
|
|
790
790
|
__rvm_monitor() {
|
791
|
-
if [ -d test/ ] ; then
|
792
|
-
|
793
|
-
elif [ -d spec/ ] ; then
|
794
|
-
|
795
|
-
fi
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
#
|
791
|
+
if [ -d test/ ] ; then
|
792
|
+
:
|
793
|
+
elif [ -d spec/ ] ; then
|
794
|
+
:
|
795
|
+
fi
|
796
|
+
}
|
797
|
+
|
798
|
+
timestamp() {
|
799
|
+
if [ "Darwin" = "$(uname)" ] ; then
|
800
|
+
echo $(stat -c "%Y" $1)
|
801
|
+
else
|
802
|
+
echo $(stat -f "%m" $1)
|
803
|
+
fi
|
805
804
|
}
|
806
805
|
|
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.58
|
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-10-
|
12
|
+
date: 2009-10-12 00:00:00 -04:00
|
13
13
|
default_executable: rvm-install
|
14
14
|
dependencies: []
|
15
15
|
|