wayneeseguin-rvm 0.0.27 → 0.0.29

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/bin/rvm-install +1 -1
  2. data/bin/rvm-update +1 -1
  3. data/rvm.gemspec +2 -2
  4. data/scripts/rvm +46 -20
  5. metadata +2 -2
data/bin/rvm-install CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # Hot potato!!! Bash it!
4
- %x["bash -l -c 'cd #{File.dirname(File.dirname(__FILE__))} && ./scripts/rvm-install #{ARGV.join(' ')} && source ~/.rvm/scripts/rvm'"]
4
+ exec "bash -l -c 'cd #{File.dirname(File.dirname(__FILE__))} && ./scripts/rvm-install #{ARGV.join(' ')} && source ~/.rvm/scripts/rvm'"
5
5
 
data/bin/rvm-update CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # Hot potato!!! Bash it!
4
- %x["bash -l -c 'cd #{File.dirname(File.dirname(__FILE__))} && ./scripts/rvm-update #{ARGV.join(' ')} && source ~/.rvm/scripts/rvm'"]
4
+ exec "bash -l -c 'cd #{File.dirname(File.dirname(__FILE__))} && ./scripts/rvm-update #{ARGV.join(' ')} && source ~/.rvm/scripts/rvm'"
5
5
 
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.27"
8
+ s.version = "0.0.29"
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-08-31}
12
+ s.date = %q{2009-09-02}
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.27"
15
- rvm_meta_updated="2009.08.31"
14
+ rvm_meta_version="0.0.29"
15
+ rvm_meta_updated="2009.09.02"
16
16
  }
17
17
 
18
18
  function __rvm_version { __rvm_meta ; echo "rvm $rvm_meta_version ($rvm_meta_updated) [$rvm_meta_website]" ; }
@@ -210,9 +210,6 @@ function __rvm_initialize {
210
210
  rvm_macruby_repo_url="${rvm_macruby_repo_url:-"http://svn.macosforge.org/repository/ruby/MacRuby"}"
211
211
  rvm_jruby_repo_url="${rvm_jruby_repo_url:-"git://kenai.com/jruby~main"}"
212
212
 
213
- if [ ! -z "$rvm_ruby_configure" ] ; then
214
- rvm_ruby_configure="$(echo $rvm_ruby_configure | tr ',-' ' -')"
215
- fi
216
213
  __rvm_clean-path
217
214
  rvm_result=$(echo $PATH | grep 'rvm\/bin:')
218
215
  if [ -z $rvm_result ] ; then
@@ -244,6 +241,7 @@ function __rvm_install-source {
244
241
  rvm_url="${rvm_url:-"ftp://ftp.ruby-lang.org/pub/ruby/1.$rvm_major_version/$rvm_ruby_package_name.tar.gz"}"
245
242
  __rvm_log "info" "\tDownloading $rvm_ruby_package_name, this may take a while depending on your connection..."
246
243
  __rvm_curl $rvm_url
244
+ if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_name/*.error.log" ; return 1 ; fi
247
245
 
248
246
  __rvm_log "info" "\tExtracting $rvm_ruby_package_name ..."
249
247
  mkdir -p $rvm_source_path/$rvm_ruby_package_name
@@ -275,7 +273,7 @@ function __rvm_install-source {
275
273
  if [ -s ./configure ] ; then
276
274
  __rvm_log "info" "\tConfiguring $rvm_ruby_package_name using ${rvm_ruby_configure:-"--enable-shared"}, this may take a while depending on your cpu(s)..."
277
275
  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
278
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_file/*.error.log" ; return 1 ; fi
276
+ if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_name/*.error.log" ; return 1 ; fi
279
277
  else
280
278
  __rvm_log "warn" "\tSkipping configure step, ./configure file does not exist."
281
279
  fi
@@ -286,14 +284,14 @@ function __rvm_install-source {
286
284
  else
287
285
  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
288
286
  fi
289
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_file/*.error.log" ; return 1 ; fi
287
+ if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_name/*.error.log" ; return 1 ; fi
290
288
  if [ -z "$rvm_ruby_make" ] ; then
291
289
  __rvm_log "info" "\tInstalling $rvm_ruby_package_name"
292
290
  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
293
291
  else
294
292
  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
295
293
  fi
296
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_file/*.error.log" ; return 1 ; fi
294
+ if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_name/*.error.log" ; return 1 ; fi
297
295
 
298
296
  chmod +x $rvm_install_path/$rvm_ruby_package_name/bin/*
299
297
 
@@ -306,6 +304,7 @@ function __rvm_install-source {
306
304
  cd $rvm_source_path/$rvm_gem_package_name
307
305
  else
308
306
  __rvm_curl $rvm_gem_url
307
+ if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_name/*.error.log" ; return 1 ; fi
309
308
  mkdir -p $rvm_source_path/$rvm_gem_package_name
310
309
  nice -n $rvm_niceness tar zxf $rvm_archives_path/$rvm_gem_package_name.tgz -C $rvm_source_path
311
310
  fi
@@ -320,6 +319,22 @@ function __rvm_install-source {
320
319
  __rvm_log "info" "Installing $rvm_gem_name"
321
320
  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
322
321
  done
322
+
323
+ set -x
324
+ passenger_ruby=$(cat <<-PassengerRuby
325
+ #!/bin/bash
326
+
327
+ GEM_HOME=$rvm_gem_home ; export GEM_HOME
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
330
+
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
323
338
  }
324
339
 
325
340
  function __rvm_install-ruby {
@@ -372,18 +387,19 @@ function __rvm_install-ruby {
372
387
  else
373
388
  __rvm_log "info" "\tDownloading $rvm_ruby_package_name, this may take a while depending on your connection..."
374
389
  __rvm_curl $rvm_url
390
+ if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_name/*.error.log" ; return 1 ; fi
375
391
  __rvm_log "info" "\tExtracting $rvm_ruby_package_name..."
376
392
  mkdir -p $rvm_source_path/$rvm_ruby_package_name
377
393
  nice -n $rvm_niceness tar xzf $rvm_archives_path/$rvm_ruby_package_name.tar.gz -C $rvm_source_path
378
394
  fi
379
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_file/*.error.log" ; return 1 ; fi
395
+ if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_name/*.error.log" ; return 1 ; fi
380
396
 
381
397
  __rvm_log "info" "\tInstalling $rvm_ruby_package_name, this may take a while, depending on your cpu(s)..."
382
398
  mkdir -p $rvm_log_path/$rvm_ruby_package_name
383
399
 
384
400
  cd $rvm_source_path/$rvm_ruby_package_name
385
401
  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
386
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_file/*.error.log" ; return 1 ; fi
402
+ if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_name/*.error.log" ; return 1 ; fi
387
403
  chmod +x $rvm_install_path/$rvm_ruby_package_name/bin/*
388
404
 
389
405
  ln -fs $rvm_install_path/$rvm_ruby_package_name/bin/ruby $rvm_install_path/bin/$rvm_ruby_package_name
@@ -395,10 +411,11 @@ function __rvm_install-ruby {
395
411
  cd $rvm_source_path/$rvm_gem_package_name
396
412
  else
397
413
  __rvm_curl $rvm_gem_url
414
+ if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_name/*.error.log" ; return 1 ; fi
398
415
  mkdir -p $rvm_source_path/$rvm_gem_package_name
399
416
  nice -n $rvm_niceness tar zxf $rvm_archives_path/$rvm_gem_package_name.tgz -C $rvm_source_path
400
417
  fi
401
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_file/*.error.log" ; return 1 ; fi
418
+ if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_name/*.error.log" ; return 1 ; fi
402
419
  # Well this is fun... fix nil error on require_paths:
403
420
  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
404
421
 
@@ -410,9 +427,9 @@ function __rvm_install-ruby {
410
427
  __rvm_log "info" "Installing $rvm_gem_name"
411
428
  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
412
429
  done
413
- ;;
430
+ ;;
414
431
 
415
- rbx|rubinius)
432
+ rbx|rubinius)
416
433
  rvm_ruby_repo_url=$rvm_rubinius_repo_url
417
434
  rvm_ruby_configure=""
418
435
  rvm_ruby_make="rake"
@@ -424,13 +441,13 @@ function __rvm_install-ruby {
424
441
  git clone --depth 1 $rvm_ruby_repo_url $rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version
425
442
  fi
426
443
  cd $rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version && $rvm_rubinius_jit rake build
427
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_file/*.error.log" ; return 1 ; fi
444
+ if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_name/*.error.log" ; return 1 ; fi
428
445
  for binary in ruby irb ; do
429
446
  ln -fs $rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version/bin/rbx $rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version/bin/$binary
430
447
  done
431
- ;;
448
+ ;;
432
449
 
433
- jruby)
450
+ jruby)
434
451
  rvm_package_file="$rvm_ruby_interpreter-bin-$rvm_ruby_version"
435
452
  rvm_url="http://dist.codehaus.org/$rvm_ruby_interpreter/$rvm_ruby_version/$rvm_package_file.zip"
436
453
  rvm_jruby_repo_url="${rvm_jruby_repo_url:-"git://kenai.com/jruby~main"}"
@@ -456,12 +473,12 @@ function __rvm_install-ruby {
456
473
  cd $rvm_source_path/$rvm_ruby_package_name
457
474
  fi
458
475
  fi
459
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_file/*.error.log" ; return 1 ; fi
476
+ if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_name/*.error.log" ; return 1 ; fi
460
477
 
461
478
  __rvm_log "info" "\tInstalling $rvm_ruby_package_name..."
462
479
  mkdir -p $rvm_install_path/$rvm_ruby_package_name/bin/
463
480
  rsync -ag $rvm_source_path/$rvm_ruby_package_name/ $rvm_install_path/$rvm_ruby_package_name/
464
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_file/*.error.log" ; return 1 ; fi
481
+ if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_package_name/*.error.log" ; return 1 ; fi
465
482
  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
466
483
  popd > /dev/null
467
484
  chmod +x $rvm_install_path/$rvm_ruby_package_name/bin/*
@@ -737,7 +754,7 @@ function __rvm_list {
737
754
  function __rvm_reset {
738
755
 
739
756
  PATH="$rvm_default_path" ; export PATH
740
- for variable in RUBY_VERSION GEM_HOME MY_RUBY_HOME ; do unset $variable ; done
757
+ for variable in RUBY_VERSION GEM_HOME MY_RUBY_HOME rvm_prompt ; do unset $variable ; done
741
758
  rm -f $rvm_install_path/default*
742
759
  rm -f $rvm_install_path/current
743
760
 
@@ -951,7 +968,16 @@ function __rvm_parse-args {
951
968
  -S|--source) rvm_source_path="$1" ; shift ;;
952
969
  -A|--archive) rvm_archives_path="$1" ; shift ;;
953
970
  -G|--gems) rvm_gem_path="$1" ; shift ;;
954
- -C|--configure) rvm_ruby_configure="$1" ; shift ;;
971
+ -C|--configure)
972
+ if [ ! -z "$1" ] ; then
973
+ rvm_ruby_configure="$(echo $1 | tr ',-' ' -')"
974
+ shift
975
+ else
976
+ rvm_action="error"
977
+ rvm_error_message="--configure *must* be followed by configure flags."
978
+ break;
979
+ fi
980
+ ;;
955
981
  -M|--make) rvm_ruby_make="$1" ; shift ;;
956
982
  -I|--make-install) rvm_ruby_make_install="$1" ; shift ;;
957
983
  -l|--level) rvm_ruby_patch_level="$1" ; shift ;;
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.27
4
+ version: 0.0.29
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-08-31 00:00:00 -07:00
12
+ date: 2009-09-02 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15