wayneeseguin-rvm 0.0.46 → 0.0.47

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 0
4
- :patch: 46
4
+ :patch: 47
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rvm}
8
- s.version = "0.0.46"
8
+ s.version = "0.0.47"
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"]
@@ -106,7 +106,7 @@ function __rvm_parse-args {
106
106
  while [ $# -gt 0 ] ; do
107
107
  rvm_token="$1" ; shift
108
108
  case "$rvm_token" in
109
- install|uninstall|path|info|setup|version|srcdir|list|symlinks|reset|debug|reload|usage|help|implode|update|readline|iconv|benchmark|bench|use|gemsync)
109
+ install|uninstall|path|info|setup|version|srcdir|list|reset|debug|reload|usage|help|implode|update|readline|iconv|benchmark|bench|use|gemsync)
110
110
  rvm_action=$rvm_token
111
111
  ;;
112
112
 
@@ -379,7 +379,6 @@ function rvm {
379
379
  srcdir) __rvm_src-dir ; result=$? ;;
380
380
  gemdup) __rvm_gem-dup ; result=$? ;;
381
381
  list) __rvm_list ; result=$? ;;
382
- symlinks) __rvm_symlinks ; result=$? ;;
383
382
  version) __rvm_version ; result=$? ;;
384
383
  reset) __rvm_reset ; result=$? ;;
385
384
  # TODO: how can we use bin_path here for reload, default file?
@@ -18,16 +18,16 @@ function __rvm_install_source {
18
18
  if [ -z "$rvm_ruby_tag" -a -z "$rvm_ruby_rev" ] ; then
19
19
  if [ ! -d $rvm_ruby_src_path ] ; then
20
20
  rvm_url="${rvm_url:-"ftp://ftp.ruby-lang.org/pub/ruby/1.$rvm_major_version/$rvm_ruby_package_name.tar.gz"}"
21
- __rvm_log "info" "\tDownloading $rvm_ruby_package_name, this may take a while depending on your connection..."
21
+ __rvm_log "info" "Downloading $rvm_ruby_package_name, this may take a while depending on your connection..."
22
22
  __rvm_fetch $rvm_url
23
23
  if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
24
- __rvm_log "info" "\tExtracting $rvm_ruby_package_name ..."
24
+ __rvm_log "info" "Extracting $rvm_ruby_package_name ..."
25
25
  mkdir -p $rvm_ruby_src_path # Is this line necessary considering -C below? v
26
26
  __rvm_run "extract" tar xzf $rvm_archives_path/$rvm_ruby_package_name.tar.gz -C $rvm_source_path
27
27
  if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
28
28
  fi
29
29
  else
30
- __rvm_log "info" "\tRetrieving Ruby from $rvm_url"
30
+ __rvm_log "info" "Retrieving Ruby from $rvm_url"
31
31
  if [ ! -z "`echo $rvm_url | grep '^git'`" ] ; then
32
32
  if [ -d "$rvm_ruby_src_path/.git" ] ; then
33
33
  cd $rvm_ruby_src_path
@@ -82,9 +82,9 @@ function __rvm_install_source {
82
82
  fi
83
83
 
84
84
  if [ -s ./Makefile -a -z "$rvm_reconfigure_flag" ] ; then
85
- __rvm_log "warn" "\tSkipping configure step, Makefile exists so configure must have already been run."
85
+ __rvm_log "warn" "Skipping configure step, Makefile exists so configure must have already been run."
86
86
  elif [ -s ./configure ] ; then
87
- __rvm_log "info" "\tConfiguring $rvm_ruby_package_name using $rvm_ruby_configure, this may take a while depending on your cpu(s)..."
87
+ __rvm_log "info" "Configuring $rvm_ruby_package_name using $rvm_ruby_configure, this may take a while depending on your cpu(s)..."
88
88
  if [ -d $rvm_path/usr/include/readline/ ] ; then
89
89
  configure_parameters="$configure_parameters --with-readline-dir=$rvm_path/usr/include/readline/"
90
90
  fi
@@ -95,10 +95,10 @@ function __rvm_install_source {
95
95
  unset configure_parameters
96
96
  if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
97
97
  else
98
- __rvm_log "error" "\tSkipping configure step, 'configure' script does not exist, did autoconf not run successfully?"
98
+ __rvm_log "error" "Skipping configure step, 'configure' script does not exist, did autoconf not run successfully?"
99
99
  fi
100
100
 
101
- __rvm_log "info" "\tCompiling $rvm_ruby_package_name, this may take a while, depending on your cpu(s)..."
101
+ __rvm_log "info" "Compiling $rvm_ruby_package_name, this may take a while, depending on your cpu(s)..."
102
102
  if [ -z "$rvm_ruby_make" ] ; then
103
103
  __rvm_run "make" make $rvm_make_flags
104
104
  else
@@ -107,7 +107,7 @@ function __rvm_install_source {
107
107
  if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
108
108
 
109
109
  if [ -z "$rvm_ruby_make" ] ; then
110
- __rvm_log "info" "\tInstalling $rvm_ruby_package_name"
110
+ __rvm_log "info" "Installing $rvm_ruby_package_name"
111
111
  __rvm_run "install" make install
112
112
  else
113
113
  __rvm_run "install" $rvm_ruby_make_install
@@ -201,16 +201,16 @@ function __rvm_install_ruby {
201
201
  if [ -d $rvm_ruby_src_path ] ; then
202
202
  cd $rvm_ruby_src_path
203
203
  else
204
- __rvm_log "info" "\tDownloading $rvm_ruby_package_name, this may take a while depending on your connection..."
204
+ __rvm_log "info" "Downloading $rvm_ruby_package_name, this may take a while depending on your connection..."
205
205
  __rvm_fetch $rvm_url
206
206
  if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
207
- __rvm_log "info" "\tExtracting $rvm_ruby_package_name..."
207
+ __rvm_log "info" "Extracting $rvm_ruby_package_name..."
208
208
  mkdir -p $rvm_ruby_src_path
209
209
  __rvm_run "extract" tar xzf $rvm_archives_path/$rvm_ruby_package_name.tar.gz -C $rvm_source_path
210
210
  if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
211
211
  fi
212
212
 
213
- __rvm_log "info" "\tInstalling $rvm_ruby_package_name, this may take a while, depending on your cpu(s)..."
213
+ __rvm_log "info" "Installing $rvm_ruby_package_name, this may take a while, depending on your cpu(s)..."
214
214
  mkdir -p $rvm_ruby_log_path
215
215
 
216
216
  cd $rvm_ruby_src_path
@@ -253,15 +253,14 @@ function __rvm_install_ruby {
253
253
  cd $rvm_ruby_home
254
254
 
255
255
  # prereqs, 1.8.6 w/ParseTree & rake. Yes this could all be one line... not pushing our luck.
256
- bash -l -c 'rvm 1.8.6 --debug --install' # This should install if missing.
257
- bash -l -c 'rvm 1.8.6 -m rbx ; $rvm_ruby_home/bin/gem install --no-rdoc --no-ri rake ParseTree' # This should install if missing.
256
+ echo `rvm install 1.8.6` # This should install if missing.
257
+ echo `rvm 1.8.6 -m rbx ; gem install --no-rdoc --no-ri rake ParseTree` # This should install if missing.
258
258
  rake186rbx=`rvm 1.8.6 -m rbx ; which rake`
259
259
  if [ ! -z "$rvm_jit_flag" ]; then
260
260
  __rvm_run "build" RBX_LLVM=1 $rake186rbx build
261
261
  else
262
262
  __rvm_run "build" $rake186rbx build
263
- fi
264
- unset rake186rbx
263
+ fi ; unset rake186rbx
265
264
 
266
265
  for binary in ruby irb ; do
267
266
  ln -fs $rvm_ruby_home/bin/rbx $rvm_ruby_home/bin/$binary
@@ -302,6 +301,7 @@ RubyWrapper
302
301
  if [ ! -z "$rvm_ruby_rev" ] ; then
303
302
  if [ ! -d $rvm_path/$rvm_ruby_interpreter-$rvm_ruby_version -o ! -d $rvm_path/$rvm_ruby_interpreter-$rvm_ruby_version/.git ] ; then
304
303
  git clone --depth 1 $rvm_jruby_repo_url $rvm_ruby_src_path
304
+ # TODO: Test if 'ant' is installed, if not throw error.
305
305
  cd $rvm_ruby_src_path && ant
306
306
  fi
307
307
  else
@@ -309,15 +309,15 @@ RubyWrapper
309
309
  cd $rvm_ruby_src_path
310
310
  else
311
311
  if [ -z "$rvm_force_flag" -a -f $rvm_package_file -a -s $rvm_package_file ] ; then
312
- __rvm_log "info" "\tIt appears that $rvm_package_file has already been downloaded, skipping. Use --force to force re-download."
312
+ __rvm_log "info" "It appears that $rvm_package_file has already been downloaded, skipping. Use --force to force re-download."
313
313
  else
314
- __rvm_log "info" "\tDownloading $rvm_package_file, this may take a while depending on your connection..."
314
+ __rvm_log "info" "Downloading $rvm_package_file, this may take a while depending on your connection..."
315
315
  __rvm_fetch $rvm_url
316
316
  fi
317
- __rvm_log "info" "\tExtracting $rvm_package_file..."
317
+ __rvm_log "info" "Extracting $rvm_package_file..."
318
318
  rvm_unzip=`which unzip`
319
319
  if [ $? -ne 0 ] ; then
320
- __rvm_log "error" "\t'unzip' was not found in your PATH. jRuby official release comes as a .zip file, hence 'unzip' is required to extract it. Please install 'unzip' and try again."
320
+ __rvm_log "error" "'unzip' was not found in your PATH. jRuby official release comes as a .zip file, hence 'unzip' is required to extract it. Please install 'unzip' and try again."
321
321
  else
322
322
  __rvm_run "extract" unzip -q $rvm_archives_path/$rvm_package_file.zip -d $rvm_source_path
323
323
  fi
@@ -325,24 +325,35 @@ RubyWrapper
325
325
  fi
326
326
  fi
327
327
 
328
- __rvm_log "info" "\tInstalling $rvm_ruby_package_name..."
328
+ __rvm_log "info" "Installing $rvm_ruby_package_name..."
329
329
  mkdir -p $rvm_ruby_home/bin/
330
330
  __rvm_run "sync" rsync -ag $rvm_ruby_src_path/ $rvm_ruby_home/
331
- __rvm_run "nailgun" cd $rvm_ruby_src_path/tool/nailgun && make $rvm_make_flags
331
+ __rvm_run "nailgun" "cd $rvm_ruby_src_path/tool/nailgun && make $rvm_make_flags"
332
332
  __rvm_pushpop
333
333
  chmod +x $rvm_ruby_home/bin/*
334
- for binary in jruby jgem jirb ; do
334
+
335
+
336
+ for binary in jirb jruby jgem ; do
335
337
  ln -fs $rvm_ruby_home/bin/$binary $rvm_ruby_home/bin/${binary#j}
336
- done
338
+ done ; unset binary
339
+
340
+ for binary in rake rdoc ri spec autospec ; do
341
+ __rvm_inject_ruby_shebang $rvm_ruby_home/bin/$binary
342
+ __rvm_inject_gem_env $rvm_ruby_home/bin/$binary
343
+ chmod +x $rvm_ruby_home/bin/$binary
344
+ done ; unset binary
337
345
 
338
346
  __rvm_irbrc
339
- __rvm_bin_scripts
347
+ __rvm_bin_script
348
+
349
+ ln -fs $rvm_ruby_home/bin/ruby $rvm_path/bin/$rvm_ruby_package_name # Is this necessary?
340
350
 
341
- ln -fs $rvm_ruby_home/bin/ruby $rvm_path/bin/$rvm_ruby_package_name
351
+ __rvm_use
342
352
  for rvm_gem_name in jruby-openssl ; do
343
353
  __rvm_log "info" "Installing $rvm_gem_name"
344
- __rvm_run "gems" $rvm_ruby_home/bin/gem install $rvm_gem_name --no-rdoc --no-ri -q
345
- done
354
+ __rvm_run "gems" gem install $rvm_gem_name --no-rdoc --no-ri -q
355
+ done ; unset rvm_gem_name
356
+
346
357
  ;;
347
358
 
348
359
  ruby)
@@ -414,23 +425,18 @@ function __rvm_post_install {
414
425
  elif [ -f "$rvm_gem_home/bin/$binary" ] ; then
415
426
  cp -f $rvm_gem_home/bin/$binary $rvm_ruby_home/bin/$binary
416
427
  fi
417
- if [ -f $rvm_ruby_home/bin/$binary ] ; then
418
- string="ENV['GEM_HOME']=ENV['GEM_HOME'] || '$rvm_gem_home'\nENV['GEM_PATH']=ENV['GEM_PATH'] || '$rvm_gem_home'\nENV['PATH']='$rvm_ruby_home/bin:$rvm_gem_home/bin:' + ENV['PATH']"
419
- awk "NR==2 {print \"$string\"} {print}" $rvm_ruby_home/bin/$binary > $rvm_ruby_home/bin/$binary.new
420
- mv $rvm_ruby_home/bin/$binary.new $rvm_ruby_home/bin/$binary
421
- else
422
- __rvm_log "info" "Skipping $rvm_ruby_src_path/bin/$binary, it is an executable not a script."
423
- fi
428
+ __rvm_inject_gem_env $rvm_ruby_home/bin/$binary
429
+ __rvm_inject_ruby_shebang $rvm_ruby_home/bin/$binary
424
430
  chmod +x $rvm_ruby_home/bin/$binary
425
431
  fi
426
- done
432
+ done ; unset binary
427
433
 
428
434
  __rvm_log "info" "Installing gems for $rvm_ruby_package_name."
429
435
 
430
436
  for rvm_gem_name in rake ; do
431
437
  __rvm_log "info" "Installing $rvm_gem_name"
432
438
  __rvm_run "gems" $rvm_ruby_home/bin/gem install $rvm_gem_name --no-rdoc --no-ri -q
433
- done
439
+ done ; unset rvm_gem_name
434
440
 
435
441
  __rvm_log "info" "Installation of gems for $rvm_ruby_package_name is complete."
436
442
 
@@ -439,14 +445,14 @@ function __rvm_post_install {
439
445
  if [ "$rvm_gem_home" != "$rvm_ruby_home" ] ; then
440
446
  cp $rvm_gem_home/bin/$binary $rvm_ruby_home/bin/$binary
441
447
  fi
448
+ __rvm_inject_ruby_shebang "$rvm_ruby_home/bin/$binary"
442
449
  __rvm_inject_gem_env "$rvm_ruby_home/bin/$binary"
443
- fi
444
- unset binary
450
+ fi ; unset binary
445
451
  }
446
452
 
447
453
  function __rvm_rubygems_setup {
448
454
  if [ -z "`echo $rvm_ruby_version | awk '/^1\.9/'`" ] ; then
449
- __rvm_log "info" "\tInstalling rubygems dedicated to $rvm_ruby_package_name..."
455
+ __rvm_log "info" "Installing rubygems dedicated to $rvm_ruby_package_name..."
450
456
  rvm_gem_package_name="rubygems-1.3.5"
451
457
  rvm_gem_url="http://rubyforge.org/frs/download.php/60718/$rvm_gem_package_name.tgz"
452
458
  if [ -d $rvm_source_path/$rvm_gem_package_name ] ; then
@@ -473,17 +479,33 @@ function __rvm_rubygems_setup {
473
479
  }
474
480
 
475
481
  function __rvm_inject_ruby_shebang {
476
- if [ -f $1 ] ; then
477
- cat $1 | sed -e "s=#!/usr/bin/env ruby=#!$rvm_ruby_home/bin/ruby=" > $1.new
478
- mv $1.new $1 ; chmod +x $1
479
- fi
482
+ __rvm_actual_file $1
483
+ if [ -f $actual_file ] ; then
484
+ sed -i.orig -e "s=#\!/usr/bin/env [j]*ruby=#\!$rvm_ruby_home/bin/ruby=" $actual_file
485
+ rm -f $actual_file.orig ; chmod +x $actual_file
486
+ fi ; unset actual_file
480
487
  }
481
488
 
482
489
  function __rvm_inject_gem_env {
483
- if [ -f $1 ] ; then
484
- string="ENV['GEM_HOME']=ENV['GEM_HOME'] || '$rvm_gem_home'\nENV['GEM_PATH']=ENV['GEM_PATH'] || '$rvm_gem_home'\nENV['PATH']='$rvm_ruby_home/bin:$rvm_gem_home/bin:' + ENV['PATH']"
485
- awk "NR==2 {print \"$string\"} {print}" $1 > $1.new
486
- mv $1.new $1 ; chmod +x $1
490
+ __rvm_actual_file $1
491
+ if [ -f $actual_file ] ; then
492
+ set -x
493
+ if [ ! -z "`head -n 1 $actual_file | awk '/[j]*ruby/'`" ] ; then
494
+ string="ENV['GEM_HOME']=ENV['GEM_HOME'] || '$rvm_gem_home'\nENV['GEM_PATH']=ENV['GEM_PATH'] || '$rvm_gem_home'\nENV['PATH']='$rvm_ruby_home/bin:$rvm_gem_home/bin:' + ENV['PATH']"
495
+ elif [ ! -z "`head -n 1 $actual_file | awk '/bash/'`" ] ; then
496
+ string="GEM_HOME=\${GEM_HOME:-'$rvm_gem_home'}\nGEM_PATH=\${GEM_PATH:-'$rvm_gem_home'}\nPATH=$rvm_ruby_home/bin:$rvm_gem_home/bin:\$PATH"
497
+ fi
498
+ set +x
499
+ awk "NR==2 {print \"$string\"} {print}" $actual_file > $actual_file.new
500
+ mv $actual_file.new $actual_file ; chmod +x $actual_file
501
+ fi ; unset string actual_file
502
+ }
503
+
504
+ function __rvm_actual_file {
505
+ if [ -L $1 ] ; then # If the file is a symlink,
506
+ actual_file=`readlink $1` # read the link target so we can preserve it.
507
+ else
508
+ actual_file="$1"
487
509
  fi
488
510
  }
489
511
 
@@ -2,17 +2,16 @@
2
2
 
3
3
  # __rvm_select implementation version patch_level
4
4
  function __rvm_select {
5
-
6
5
  if [ ! -z "$rvm_ruby_string" ] ; then
7
6
  __rvm_ruby_string
8
7
  elif [ ! -z "$rvm_ruby_selector" ] ; then
9
- if [ ! -z "$(echo $rvm_ruby_selector | awk '/^[0-9]/')" ] ; then
10
- rvm_ruby_interpreter="ruby"
11
- rvm_ruby_version=$rvm_ruby_selector
12
- else
13
- rvm_ruby_interpreter="$rvm_ruby_selector"
14
- unset rvm_ruby_version
15
- fi
8
+ if [ ! -z "$(echo $rvm_ruby_selector | awk '/^[0-9]/')" ] ; then
9
+ rvm_ruby_interpreter="ruby"
10
+ rvm_ruby_version=$rvm_ruby_selector
11
+ else
12
+ rvm_ruby_interpreter="$rvm_ruby_selector"
13
+ unset rvm_ruby_version
14
+ fi
16
15
  elif [ ! -z "$rvm_ruby_interpreter" ] ; then
17
16
  if [ ! -z "$(echo $rvm_ruby_interpreter | awk '/^[0-9]/')" ] ; then
18
17
  rvm_ruby_version=$rvm_ruby_interpreter
@@ -27,7 +26,6 @@ function __rvm_select {
27
26
  if [ "$rvm_ruby_version" = "1.9" ] ; then rvm_ruby_version="1.9.1" ; fi
28
27
 
29
28
  case "$rvm_ruby_interpreter" in
30
-
31
29
  macruby)
32
30
  if [ "`uname`" = "Darwin" ] ; then
33
31
  rvm_ruby_repo_url="${rvm_ruby_repo_url:-`__rvm_db "macruby_repo_url"`}"
@@ -64,6 +62,7 @@ function __rvm_select {
64
62
  ;;
65
63
 
66
64
  ruby-enterprise|ree)
65
+ rvm_ruby_interpreter="ree"
67
66
  rvm_ruby_interpreter=`__rvm_db "ree_interpreter"`
68
67
  rvm_ruby_version=${rvm_ruby_version:-`__rvm_db "ree_version"`}
69
68
  rvm_ruby_patch_level="${3:-`__rvm_db "ree_patch_level"`}"
@@ -146,11 +145,9 @@ function __rvm_select {
146
145
  else
147
146
  rvm_gem_home=$GEM_HOME
148
147
  fi
149
-
150
148
  }
151
149
 
152
150
  function __rvm_use {
153
-
154
151
  if [ -z "$rvm_selected" ] ; then __rvm_select $* ; fi
155
152
  if [ -z "$rvm_ruby_interpreter" ] ; then rvm_ruby_interpreter="default" ; fi
156
153
 
@@ -54,11 +54,11 @@ function __rvm_debug {
54
54
  # Logging functions based on level
55
55
  function __rvm_log {
56
56
  case "$1" in
57
- debug) shift ; echo -e "\033[0;35m<debug> \033[0m $* \033[0;35m</debug> \033[0m " ;;
58
- info) shift ; echo -e "\033[0;32m<info> \033[0m $* \033[0;32m</info> \033[0m " ;;
59
- warn) shift ; echo -e "\033[0;33m<warning> \033[0m $* \033[0;33m</warning> \033[0m " ;;
60
- error) shift ; echo -e "\033[0;31m<error> \033[0m $* \033[0;31m</error> \033[0m " ;;
61
- fail) shift ; echo -e "\033[0;31m<fail> \033[0m $* \033[0;31m</fail> \033[0m " ; __rvm_pushpop ; return 1 ;;
57
+ debug) shift ; echo -e "\033[0;35m<debug>\033[0m $* \033[0;35m</debug> \033[0m " ;;
58
+ info) shift ; echo -e "\033[0;32m<info>\033[0m $* \033[0;32m</info> \033[0m " ;;
59
+ warn) shift ; echo -e "\033[0;33m<warning>\033[0m $* \033[0;33m</warning> \033[0m " ;;
60
+ error) shift ; echo -e "\033[0;31m<error>\033[0m $* \033[0;31m</error> \033[0m " ;;
61
+ fail) shift ; echo -e "\033[0;31m<fail>\033[0m $* \033[0;31m</fail> \033[0m " ; __rvm_pushpop ; return 1 ;;
62
62
  *) echo -e "$*"
63
63
  esac
64
64
  }
@@ -86,7 +86,7 @@ function __rvm_run {
86
86
  if [ -z "$rvm_niceness" -o "$rvm_niceness" = "0" ] ; then
87
87
  eval "$command" >> $rvm_ruby_log_path/$log_file_name.log 2>> $rvm_ruby_log_path/$log_file_name.error.log
88
88
  else
89
- eval "nice -n $rvm_niceness /bin/bash -l -c '$command'" >> $rvm_ruby_log_path/$log_file_name.log 2>> $rvm_ruby_log_path/$log_file_name.error.log
89
+ eval "nice -n $rvm_niceness \`$command\`" >> $rvm_ruby_log_path/$log_file_name.log 2>> $rvm_ruby_log_path/$log_file_name.error.log
90
90
  fi
91
91
  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
92
92
  unset log_file command
@@ -102,9 +102,7 @@ function __rvm_load-rvmrc {
102
102
  }
103
103
 
104
104
  function __rvm_bin_scripts {
105
- # NOTE: This depends on the forthcoming ruby_string select functionality.
106
- rvm_ruby_binaries=`/bin/ls $rvm_path/*/bin/ruby 2> /dev/null`
107
- for rvm_ruby_binary in $rvm_ruby_binaries ; do
105
+ for rvm_ruby_binary in `/bin/ls $rvm_path/*/bin/ruby 2> /dev/null` ; do
108
106
  if [ -x $rvm_ruby_binary ] ; then
109
107
  rvm_ruby_string=`dirname $rvm_ruby_binary | xargs dirname | xargs basename`
110
108
  __rvm_select
@@ -344,8 +342,7 @@ function __rvm_list {
344
342
  else
345
343
  echo -e " $version : $string"
346
344
  fi
347
- done
348
- unset version
345
+ done ; unset version
349
346
 
350
347
  echo -e "\njruby:\n"
351
348
  for version in `/bin/ls -l $rvm_path/ 2> /dev/null | awk '/jruby-.*/ { print $NF }'` ; do
@@ -356,8 +353,7 @@ function __rvm_list {
356
353
  else
357
354
  echo -e " $version : $string"
358
355
  fi
359
- done
360
- unset version
356
+ done ; unset version
361
357
 
362
358
  echo -e "\nree:\n"
363
359
  for version in `/bin/ls $rvm_path/ 2> /dev/null | awk '/ruby-enterprise-.*/ { print $NF }'` ; do
@@ -368,7 +364,7 @@ function __rvm_list {
368
364
  else
369
365
  echo -e " $version : $string"
370
366
  fi
371
- done
367
+ done ; unset version
372
368
 
373
369
  if [ -f $rvm_path/default -a -s $rvm_path/default ] ; then
374
370
  version=`grep '^MY_RUBY_HOME' ~/.rvm/default | awk -F"'" '{print $2}' | xargs basename`
@@ -381,25 +377,22 @@ function __rvm_list {
381
377
  else
382
378
  echo -e " $version : $string"
383
379
  fi
384
- fi
380
+ fi ; unset version
385
381
  fi
386
382
 
387
383
  echo -e "\nsystem:\n"
388
- system_version=`bash -l -c 'rvm system ; ruby -v 2> /dev/null'`
384
+ system_version=`rvm system ; ruby -v 2> /dev/null`
389
385
  if [ ! -z "$system_version" ] ; then
390
386
  if [ "$selected" = "1" ] ; then
391
387
  echo -e " $system_version\n"
392
388
  else
393
389
  echo -e "=> $system_version\n"
394
390
  fi
395
- fi
396
- unset current version selected
391
+ fi ; unset current version selected
397
392
  fi
398
-
399
393
  }
400
394
 
401
395
  function __rvm_initialize {
402
-
403
396
  rvm_fetch=`which curl`
404
397
  if [ $? -ne 0 ] ; then
405
398
  rvm_fetch=`which wget`
@@ -522,7 +515,7 @@ function __rvm_ruby_do {
522
515
  rvm_command="$rvm_ruby_home/bin/$binary $rvm_ruby_args"
523
516
  fi
524
517
  echo -e "\n$rvm_ruby_string: $($rvm_ruby_home/bin/$binary -v)"
525
- eval $rvm_command
518
+ eval "$rvm_command"
526
519
  result=$?
527
520
  if [ $result -eq 0 ]; then
528
521
  eval "successes=(${successes[*]} $rvm_ruby_string)"
@@ -550,6 +543,9 @@ function __rvm_do {
550
543
  unset rvm_ruby_string
551
544
  __rvm_ruby_do
552
545
  done
546
+ elif [ ! -z "$rvm_ruby_interpreter" ] ; then
547
+ unset rvm_ruby_string rvm_ruby_version
548
+ __rvm_ruby_do
553
549
  else # all
554
550
  while read bin_line
555
551
  do # Keep this on second line damnit!
@@ -666,8 +662,6 @@ function __rvm_ruby_string {
666
662
  fi
667
663
  fi
668
664
  fi
669
-
670
- if [ "rvm_ruby_interpreter" = "ree" ] ; then rvm_ruby_interpreter="ruby-enterprise" ; fi
671
665
  fi
672
666
  return 0
673
667
  }
@@ -813,3 +807,4 @@ function __rvm_iconv_install {
813
807
  __rvm_run "$package.make.install" make install
814
808
  __rvm_pushpop
815
809
  }
810
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wayneeseguin-rvm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.46
4
+ version: 0.0.47
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wayne E. Seguin