rvm 0.0.32 → 0.0.33

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.
Files changed (3) hide show
  1. data/rvm.gemspec +2 -2
  2. data/scripts/rvm +92 -79
  3. metadata +2 -2
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.32"
8
+ s.version = "0.0.33"
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-09-03}
12
+ s.date = %q{2009-09-04}
13
13
  s.description = %q{Manages Ruby interpreter installations and switching between them.}
14
14
  s.email = %q{wayneeseguin@gmail.com}
15
15
  s.executables = ["rvm-install", "rvm-update"]
data/scripts/rvm CHANGED
@@ -11,8 +11,8 @@ 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.32"
15
- rvm_meta_updated="2009.09.03"
14
+ rvm_meta_version="0.0.33"
15
+ rvm_meta_updated="2009.09.04"
16
16
  }
17
17
 
18
18
  function __rvm_version { __rvm_meta ; echo "rvm $rvm_meta_version ($rvm_meta_updated) [$rvm_meta_website]" ; }
@@ -190,7 +190,7 @@ function __rvm_initialize {
190
190
  if [ $? -ne 0 ] ; then
191
191
  rvm_fetch="wget -q -c "
192
192
  else
193
- __rvm_log "fail" "rvm expects either curl or wget, neither seem to be in your path :("
193
+ __rvm_log "fail" "rvm expects either curl or wget, neither seem to be in your path :("
194
194
  fi
195
195
  else
196
196
  rvm_fetch="$rvm_fetch -O -L -s -C - "
@@ -237,10 +237,23 @@ function __rvm_fetch {
237
237
 
238
238
  pushd $rvm_archives_path > /dev/null
239
239
  eval $rvm_fetch "$1"
240
+ if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_ruby_log_path/*.error.log" ; popd 2> /dev/null ; return 1 ; fi
240
241
  popd 2> /dev/null
241
242
 
242
243
  }
243
244
 
245
+ #
246
+ # Installer
247
+ #
248
+ function __rvm_run {
249
+ log_file_name="1" ; shift
250
+ command="$*"
251
+ if [ $rvm_debug ] ; then __rvm_log "debug" "Executing: $command" ; fi
252
+ eval "nice -n $rvm_niceness $command" > $rvm_ruby_log_path/log_file_name.log 2> $rvm_ruby_log_path/log_file_name.error.log
253
+ if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_ruby_log_path/log_file_name.error.log" ; popd 2> /dev/null ; return 1 ; fi
254
+ unset log_file command
255
+ }
256
+
244
257
  function __rvm_install-source {
245
258
 
246
259
  if [ -z "$rvm_selected" ] ; then __rvm_select $* ; fi
@@ -260,11 +273,9 @@ function __rvm_install-source {
260
273
  rvm_url="${rvm_url:-"ftp://ftp.ruby-lang.org/pub/ruby/1.$rvm_major_version/$rvm_ruby_package_name.tar.gz"}"
261
274
  __rvm_log "info" "\tDownloading $rvm_ruby_package_name, this may take a while depending on your connection..."
262
275
  __rvm_fetch $rvm_url
263
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_ruby_log_path/*.error.log" ; popd 2> /dev/null ; return 1 ; fi
264
-
265
276
  __rvm_log "info" "\tExtracting $rvm_ruby_package_name ..."
266
- mkdir -p $rvm_ruby_src_path
267
- nice -n $rvm_niceness tar xzf $rvm_archives_path/$rvm_ruby_package_name.tar.gz -C $rvm_source_path
277
+ mkdir -p $rvm_ruby_src_path # Is this line necessary considering -C below? v
278
+ __rvm_run "extract" tar xzf $rvm_archives_path/$rvm_ruby_package_name.tar.gz -C $rvm_source_path
268
279
  fi
269
280
  else
270
281
  __rvm_log "info" "\tRetrieving Ruby from $rvm_url"
@@ -302,49 +313,41 @@ function __rvm_install-source {
302
313
  fi
303
314
  fi
304
315
  fi
316
+
305
317
  cd $rvm_ruby_src_path
306
318
  if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_ruby_log_path/*.error.log" ; popd 2> /dev/null ; return 1 ; fi
307
- if [ ! -s $rvm_ruby_src_path/Makefile -a "$rvm_ruby_interpreter" = "ruby" ] ; then autoconf ; fi
319
+
320
+ if [ ! -s "$rvm_ruby_src_path/configure" -a "$rvm_ruby_interpreter" = "ruby" ] ; then
321
+ rvm_autoconf=`which autoconf`
322
+ if [ $? -ne 0 ] ; then __rvm_log "fail" "rvm expects autoconf" ; fi
323
+ __rvm_run "autoconf" $rvm_autoconf
324
+ fi
325
+
308
326
  if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_ruby_log_path/*.error.log" ; popd 2> /dev/null ; return 1 ; fi
327
+
309
328
  if [ -s ./configure ] ; then
310
329
  __rvm_log "info" "\tConfiguring $rvm_ruby_package_name using $rvm_ruby_configure, this may take a while depending on your cpu(s)..."
311
- # command="nice -n $rvm_niceness ./configure --prefix=$rvm_ruby_home $rvm_ruby_configure"
312
- # eval $command > $rvm_ruby_log_path/configure.log 2> $rvm_ruby_log_path/configure.error.log
313
330
  __rvm_run "configure" ./configure --prefix=$rvm_ruby_home $rvm_ruby_configure
314
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_ruby_log_path/*.error.log" ; popd 2> /dev/null ; return 1 ; fi
315
331
  else
316
332
  __rvm_log "warn" "\tSkipping configure step, ./configure file does not exist."
317
333
  fi
318
334
 
319
335
  __rvm_log "info" "\tCompiling $rvm_ruby_package_name, this may take a while, depending on your cpu(s)..."
320
336
  if [ -z "$rvm_ruby_make" ] ; then
321
- nice -n $rvm_niceness make > $rvm_ruby_log_path/make.log 2> $rvm_ruby_log_path/make.error.log
337
+ __rvm_run "make" make
322
338
  else
323
- nice -n $rvm_niceness $rvm_ruby_make > $rvm_ruby_log_path/install.log 2> $rvm_ruby_log_path/install.error.log
339
+ __rvm_run "make" $rvm_ruby_make
324
340
  fi
325
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_ruby_log_path/*.error.log" ; popd 2> /dev/null ; return 1 ; fi
341
+
326
342
  if [ -z "$rvm_ruby_make" ] ; then
327
343
  __rvm_log "info" "\tInstalling $rvm_ruby_package_name"
328
- nice -n $rvm_niceness make install > $rvm_ruby_log_path/install.log 2> $rvm_ruby_log_path/install.error.log
344
+ __rvm_run "install" make install
329
345
  else
330
- nice -n $rvm_niceness $rvm_ruby_make_install > $rvm_ruby_log_path/install.log 2> $rvm_ruby_log_path/install.error.log
346
+ __rvm_run "install" $rvm_ruby_make_install
331
347
  fi
332
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_ruby_log_path/*.error.log" ; popd 2> /dev/null ; return 1 ; fi
333
-
334
- chmod +x $rvm_ruby_home/bin/*
348
+ __rvm_run "chmod.bin" chmod +x $rvm_ruby_home/bin/*
335
349
 
336
- ruby_wrapper=$(cat <<-RubyWrapper
337
- #!/bin/bash
338
- GEM_HOME=$rvm_gem_home ; export GEM_HOME
339
- MY_RUBY_HOME=$rvm_ruby_home ; export MY_RUBY_HOME
340
- PATH=$rvm_ruby_home/bin:$rvm_gem_home/bin:$rvm_default_path ; export PATH
341
-
342
- exec "$rvm_ruby_binary" "\$@"
343
- RubyWrapper
344
- )
345
- echo "$ruby_wrapper" > $rvm_bin_path/$rvm_ruby_package_name
346
- unset ruby_wrapper
347
- chmod +x $rvm_bin_path/$rvm_ruby_package_name
350
+ __rvm_bin_scripts
348
351
  __rvm_log "info" "Installation of $rvm_ruby_package_name is complete."
349
352
 
350
353
  __rvm_log "info" "\tInstalling rubygems dedicated to $rvm_ruby_package_name..."
@@ -354,20 +357,19 @@ RubyWrapper
354
357
  cd $rvm_source_path/$rvm_gem_package_name
355
358
  else
356
359
  __rvm_fetch $rvm_gem_url
357
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_ruby_log_path/*.error.log" ; popd 2> /dev/null ; return 1 ; fi
358
360
  mkdir -p $rvm_source_path/$rvm_gem_package_name
359
- nice -n $rvm_niceness tar zxf $rvm_archives_path/$rvm_gem_package_name.tgz -C $rvm_source_path
361
+ __rvm_run "rubygems.extract" tar zxf $rvm_archives_path/$rvm_gem_package_name.tgz -C $rvm_source_path
360
362
  fi
361
363
  # Well this is fun... fix nil error on require_paths:
362
364
  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
363
365
 
364
- nice -n $rvm_niceness $rvm_ruby_home/bin/ruby $rvm_source_path/$rvm_gem_package_name/setup.rb > $rvm_ruby_log_path/rubygems.install.log 2> $rvm_ruby_log_path/rubygems.install.error.log
366
+ __rvm_run "rubygems.install" $rvm_ruby_binary $rvm_source_path/$rvm_gem_package_name/setup.rb
365
367
  popd 2> /dev/null
366
368
 
367
369
 
368
370
  for rvm_gem_name in rake ; do
369
371
  __rvm_log "info" "Installing $rvm_gem_name"
370
- nice -n $rvm_niceness $rvm_ruby_home/bin/gem install $rvm_gem_name --no-rdoc --no-ri -q >> $rvm_ruby_log_path/gems.install.log 2> $rvm_ruby_log_path/gems.error.log
372
+ __rvm_run "gems" $rvm_ruby_home/bin/gem install $rvm_gem_name --no-rdoc --no-ri -q
371
373
  done
372
374
 
373
375
  for binary in gem irb erb ri rdoc testrb rake ; do
@@ -386,7 +388,7 @@ RubyWrapper
386
388
  string="ENV['GEM_HOME']='$rvm_gem_home'\nENV['PATH']='$rvm_ruby_home/bin:$rvm_gem_home/bin:$rvm_default_path'"
387
389
  mv $rvm_gem_home/bin/$binary $rvm_gem_home/bin/$binary.orig
388
390
  awk "NR==2 {print \"$string\"} {print}" $rvm_gem_home/bin/$binary.orig > $rvm_gem_home/bin/$binary
389
- chmod +x $rvm_gem_home/bin/$binary
391
+ chmod +x $rvm_gem_home/bin/$binary
390
392
  else
391
393
  __rvm_log "warn" "$rvm_gem_home/bin/$binary is missing"
392
394
  fi
@@ -400,8 +402,7 @@ RubyWrapper
400
402
  function __rvm_install-ruby {
401
403
 
402
404
  if [ -z "$rvm_selected" ] ; then __rvm_select $* ; fi
403
-
404
- if [ -z "$RUBYOPT" ] ; then ruby_options=$RUBYOPT ; unset RUBYOPT ; fi
405
+ if [ -z "$RUBYOPT" ] ; then ruby_options=$RUBYOPT ; unset RUBYOPT ; fi
405
406
 
406
407
  case "$rvm_ruby_interpreter" in
407
408
 
@@ -411,7 +412,7 @@ function __rvm_install-ruby {
411
412
  rvm_ruby_configure=""
412
413
  rvm_ruby_make="rake macruby:build framework_instdir=$rvm_install_path/macruby-head framework_name=/macruby-head --trace"
413
414
  rvm_ruby_make_install="rake framework:install framework_instdir=$rvm_install_path/macruby-head framework_name=/macruby-head --trace"
414
- rvm_ruby_rev="${rvm_ruby_rev:-head}" # Hard coding this for now
415
+ #rvm_ruby_rev="${rvm_ruby_rev:-head}" # Hard coding this for now
415
416
 
416
417
  DESTDIR="$rvm_ruby_home" ; export DESTDIR
417
418
  if [ -z "$rvm_ruby_rev" ] ; then
@@ -427,10 +428,14 @@ function __rvm_install-ruby {
427
428
  rvm_ruby_rev="-r $rvm_ruby_rev"
428
429
  fi
429
430
  fi
430
- __rvm_install-source
431
+ __rvm_fetch $rvm_url
432
+
433
+ __rvm_run /usr/sbin/installer -pkg $rvm_ruby_package_name.pkg -target "$rvm_install_path/$rvm_ruby_package_name/"
434
+
435
+ #__rvm_install-source
431
436
  unset DESTDIR
432
437
  else
433
- __rvm_log "fail" "MacRuby can only be installed on a Darwin OS."
438
+ __rvm_log "fail" "MacRuby can only be installed on a Darwin OS."
434
439
  fi
435
440
  ;;
436
441
 
@@ -446,16 +451,14 @@ function __rvm_install-ruby {
446
451
  if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_ruby_log_path/*.error.log" ; popd 2> /dev/null ; return 1 ; fi
447
452
  __rvm_log "info" "\tExtracting $rvm_ruby_package_name..."
448
453
  mkdir -p $rvm_ruby_src_path
449
- nice -n $rvm_niceness tar xzf $rvm_archives_path/$rvm_ruby_package_name.tar.gz -C $rvm_source_path
454
+ __rvm_run "extract" tar xzf $rvm_archives_path/$rvm_ruby_package_name.tar.gz -C $rvm_source_path
450
455
  fi
451
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_ruby_log_path/*.error.log" ; popd 2> /dev/null ; return 1 ; fi
452
456
 
453
457
  __rvm_log "info" "\tInstalling $rvm_ruby_package_name, this may take a while, depending on your cpu(s)..."
454
458
  mkdir -p $rvm_ruby_log_path
455
459
 
456
460
  cd $rvm_ruby_src_path
457
- 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_ruby_log_path/install.log 2> $rvm_ruby_log_path/install.error.log
458
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_ruby_log_path/*.error.log" ; popd 2> /dev/null ; return 1 ; fi
461
+ __rvm_run "install" ./installer -a $rvm_install_path/ruby-enterprise-$rvm_ruby_version-$rvm_ruby_patch_level --dont-install-useful-gems --no-tcmalloc
459
462
  chmod +x $rvm_ruby_home/bin/*
460
463
 
461
464
  ln -fs $rvm_ruby_home/bin/ruby $rvm_install_path/bin/$rvm_ruby_package_name
@@ -467,21 +470,19 @@ function __rvm_install-ruby {
467
470
  cd $rvm_source_path/$rvm_gem_package_name
468
471
  else
469
472
  __rvm_fetch $rvm_gem_url
470
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_ruby_log_path/*.error.log" ; popd 2> /dev/null ; return 1 ; fi
471
473
  mkdir -p $rvm_source_path/$rvm_gem_package_name
472
- nice -n $rvm_niceness tar zxf $rvm_archives_path/$rvm_gem_package_name.tgz -C $rvm_source_path
474
+ __rvm_run "extract" tar zxf $rvm_archives_path/$rvm_gem_package_name.tgz -C $rvm_source_path
473
475
  fi
474
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_ruby_log_path/*.error.log" ; popd 2> /dev/null ; return 1 ; fi
475
476
  # Well this is fun... fix nil error on require_paths:
476
477
  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_ruby_log_path/rubygems.install.log 2> $rvm_ruby_log_path/rubygems.install.error.log
477
478
 
478
- nice -n $rvm_niceness $rvm_ruby_home/bin/ruby $rvm_source_path/$rvm_gem_package_name/setup.rb > $rvm_ruby_log_path/rubygems.install.log 2> $rvm_ruby_log_path/rubygems.install.error.log
479
+ __rvm_run "rubygems.install" $rvm_ruby_home/bin/ruby $rvm_source_path/$rvm_gem_package_name/setup.rb
479
480
  __rvm_log "info" "Installation of $rvm_ruby_package_name complete."
480
481
  popd 2> /dev/null
481
482
 
482
483
  for rvm_gem_name in rake ; do
483
484
  __rvm_log "info" "Installing $rvm_gem_name"
484
- nice -n $rvm_niceness $rvm_ruby_home/bin/gem install $rvm_gem_name --no-rdoc --no-ri -q >> $rvm_ruby_log_path/gems.install.log 2> $rvm_ruby_log_path/gems.error.log
485
+ __rvm_run "gems" $rvm_ruby_home/bin/gem install $rvm_gem_name --no-rdoc --no-ri -q
485
486
  done
486
487
  ;;
487
488
 
@@ -491,16 +492,17 @@ function __rvm_install-ruby {
491
492
  rvm_ruby_configure=""
492
493
  rvm_ruby_make="rake"
493
494
  rvm_ruby_make_install="rake install"
495
+ rvm_ruby_home="$rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version"
494
496
  #rvm_ruby_rev="head"
495
497
  # TODO: Check if already git repo, then git pull origin master && build
496
- if [ ! -d $rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version -o ! -d $rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version/.git ] ; then
497
- rm -rf $rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version
498
- git clone --depth 1 $rvm_ruby_repo_url $rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version
498
+ if [ ! -d $rvm_ruby_home -o ! -d $rvm_ruby_home/.git ] ; then
499
+ rm -rf $rvm_ruby_home
500
+ git clone --depth 1 $rvm_ruby_repo_url $rvm_ruby_home
499
501
  fi
500
- cd $rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version && $rvm_rubinius_jit rake build
501
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_ruby_log_path/*.error.log" ; popd 2> /dev/null ; return 1 ; fi
502
+ cd $rvm_ruby_home
503
+ __rvm_run "build" $rvm_rubinius_jit rake build
502
504
  for binary in ruby irb ; do
503
- ln -fs $rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version/bin/rbx $rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version/bin/$binary
505
+ ln -fs $rvm_ruby_home/bin/rbx $rvm_ruby_home/bin/$binary
504
506
  done
505
507
  ;;
506
508
 
@@ -513,7 +515,6 @@ function __rvm_install-ruby {
513
515
  mkdir -p $rvm_ruby_log_path
514
516
  pushd $rvm_source_path > /dev/null
515
517
 
516
-
517
518
  if [ ! -z "$rvm_ruby_rev" ] ; then
518
519
  if [ ! -d $rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version -o ! -d $rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version/.git ] ; then
519
520
  git clone --depth 1 $rvm_jruby_repo_url $rvm_ruby_src_path
@@ -526,17 +527,15 @@ function __rvm_install-ruby {
526
527
  __rvm_log "info" "\tDownloading $rvm_package_file, this may take a while depending on your connection..."
527
528
  __rvm_fetch $rvm_url
528
529
  __rvm_log "info" "\tExtracting $rvm_package_file..."
529
- nice -n $rvm_niceness unzip -q $rvm_archives_path/$rvm_package_file.zip -d $rvm_source_path
530
+ __rvm_run "extract" unzip -q $rvm_archives_path/$rvm_package_file.zip -d $rvm_source_path
530
531
  cd $rvm_ruby_src_path
531
532
  fi
532
533
  fi
533
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_ruby_log_path/*.error.log" ; popd 2> /dev/null ; return 1 ; fi
534
534
 
535
535
  __rvm_log "info" "\tInstalling $rvm_ruby_package_name..."
536
536
  mkdir -p $rvm_ruby_home/bin/
537
- rsync -ag $rvm_ruby_src_path/ $rvm_ruby_home/
538
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_ruby_log_path/*.error.log" ; popd 2> /dev/null ; return 1 ; fi
539
- cd $rvm_ruby_src_path/tool/nailgun && make > $rvm_ruby_log_path/install.nailgun.log 2> $rvm_ruby_log_path/install.error.nailgun.log
537
+ __rvm_run "sync" rsync -ag $rvm_ruby_src_path/ $rvm_ruby_home/
538
+ __rvm_run "nailgun" cd $rvm_ruby_src_path/tool/nailgun && make
540
539
  popd 2> /dev/null
541
540
  chmod +x $rvm_ruby_home/bin/*
542
541
  for binary in jruby jgem jirb ; do
@@ -544,10 +543,9 @@ function __rvm_install-ruby {
544
543
  done
545
544
 
546
545
  ln -fs $rvm_ruby_home/bin/ruby $rvm_install_path/bin/$rvm_ruby_package_name
547
-
548
546
  for rvm_gem_name in rake jruby-openssl ; do
549
547
  __rvm_log "info" "Installing $rvm_gem_name"
550
- nice -n $rvm_niceness $rvm_ruby_home/bin/jgem install $rvm_gem_name --no-rdoc --no-ri -q >> $rvm_ruby_log_path/gems.install.log 2> $rvm_ruby_log_path/gems.error.log
548
+ __rvm_run "gems" $rvm_ruby_home/bin/jgem install $rvm_gem_name --no-rdoc --no-ri -q
551
549
  done
552
550
  ;;
553
551
 
@@ -592,6 +590,9 @@ function __rvm_uninstall {
592
590
  fi
593
591
 
594
592
  }
593
+ #
594
+ # /Installer
595
+ #
595
596
 
596
597
  # __rvm_select implementation version patch_level
597
598
  function __rvm_select {
@@ -603,10 +604,13 @@ function __rvm_select {
603
604
  if [ "$rvm_ruby_version" = "1.9" ] ; then rvm_ruby_version="1.9.1" ; fi
604
605
 
605
606
  case "$rvm_ruby_interpreter" in
607
+
606
608
  macruby)
607
609
  if [ "`uname`" = "Darwin" ] ; then
608
610
  rvm_ruby_repo_url=$rvm_macruby_repo_url
609
- rvm_ruby_version="head" # For now we are only supporting latest
611
+ rvm_ruby_version="${rvm_ruby_version:-'2009-09-04'}" # For now we are only supporting nightly builds
612
+ rvm_ruby_package_name=${rvm_ruby_interpreter}_nightly-${rvm_ruby_version}
613
+ rvm_url="http://dl.getdropbox.com/u/163257/$rvm_ruby_package_name.pkg"
610
614
  unset rvm_ruby_patch_level
611
615
  else
612
616
  __rvm_log "fail" "MacRuby can only be installed on a Darwin OS."
@@ -734,7 +738,6 @@ function __rvm_use {
734
738
  if [ "$rvm_ruby_interpreter" = "default" -a -s $rvm_install_path/current ] ; then
735
739
  source $rvm_install_path/current
736
740
  fi
737
-
738
741
  else
739
742
  GEM_HOME=$rvm_gem_home ; export GEM_HOME
740
743
  MY_RUBY_HOME=$rvm_ruby_home ; export MY_RUBY_HOME
@@ -748,9 +751,9 @@ function __rvm_use {
748
751
 
749
752
  if [ ! -s "$rvm_ruby_irbrc" ] ; then
750
753
  rvm_irbrc_file=$(cat <<Config
751
- require "irb/completion" rescue nil
754
+ require "irb/completion" rescue nil
752
755
  @prompt = {
753
- :PROMPT_I => "${rvm_ruby_package_name} > ", # default prompt
756
+ :PROMPT_I => "${rvm_ruby_package_name} > ", # default prompt
754
757
  :PROMPT_S => "${rvm_ruby_package_name}%l> ", # known continuation
755
758
  :PROMPT_C => "${rvm_ruby_package_name} > ",
756
759
  :PROMPT_N => "${rvm_ruby_package_name} ?> ", # unknown continuation
@@ -760,11 +763,10 @@ function __rvm_use {
760
763
  @prompt_mode = :DEFAULT
761
764
  IRB.conf[:PROMPT][@prompt_mode] = @prompt
762
765
  IRB.conf[:PROMPT_MODE] = @prompt_mode
763
-
764
766
  Config
765
767
  )
766
768
  if [ -s ~/.irbrc ] ; then
767
- cat ~/.irbrc > $rvm_ruby_home/.irbrc
769
+ cp ~/.irbrc $rvm_ruby_home/.irbrc
768
770
  fi
769
771
  echo "$rvm_irbrc_file" >> $rvm_ruby_home/.irbrc
770
772
  fi
@@ -790,7 +792,27 @@ Config
790
792
  fi
791
793
  }
792
794
 
795
+ function __rvm_bin_scripts {
796
+ if [ -z "$rvm_selected" ] ; then __rvm_select $* ; fi
797
+
798
+ ruby_wrapper=$(cat <<-RubyWrapper
799
+ #!/bin/bash
800
+ GEM_HOME=$rvm_gem_home ; export GEM_HOME
801
+ MY_RUBY_HOME=$rvm_ruby_home ; export MY_RUBY_HOME
802
+ PATH=$rvm_ruby_home/bin:$rvm_gem_home/bin:$rvm_default_path ; export PATH
803
+
804
+ exec "$rvm_ruby_binary" "\$@"
805
+ RubyWrapper
806
+ )
807
+
808
+ echo "$ruby_wrapper" > $rvm_bin_path/$rvm_ruby_package_name
809
+ unset ruby_wrapper
810
+ chmod +x $rvm_bin_path/$rvm_ruby_package_name
811
+
812
+ }
813
+
793
814
  function __rvm_symlinks {
815
+ # TODO: Account for the ruby wrapper script files
794
816
 
795
817
  mkdir -p ${rvm_install_path}/bin
796
818
  for release in `/bin/ls $rvm_install_path | grep 'ruby-'` ; do
@@ -902,15 +924,6 @@ function __rvm_gem-dup {
902
924
 
903
925
  }
904
926
 
905
- function __rvm_run {
906
- log_file="1" ; shift
907
- command="$*"
908
- if [ $rvm_debug ] ; then __rvm_log "debug" "Executing: $command" ; fi
909
- eval "nice -n $rvm_niceness $command" > $rvm_ruby_log_path/log_file.log 2> $rvm_ruby_log_path/log_file.error.log
910
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_ruby_log_path/log_file.error.log" ; popd 2> /dev/null ; return 1 ; fi
911
- unset log_file command
912
- }
913
-
914
927
  function __rvm_cache {
915
928
  rvm_cache_file="$rvm_config_path/cache"
916
929
  touch $rvm_cache_file
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.32
4
+ version: 0.0.33
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-09-03 00:00:00 -04:00
12
+ date: 2009-09-04 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15