wayneeseguin-rvm 0.0.30 → 0.0.31

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/rvm.gemspec +2 -2
  2. data/scripts/rvm +192 -139
  3. data/scripts/rvm-install +2 -1
  4. metadata +4 -3
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.30"
8
+ s.version = "0.0.31"
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-02}
12
+ s.date = %q{2009-09-03}
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.30"
15
- rvm_meta_updated="2009.09.02"
14
+ rvm_meta_version="0.0.31"
15
+ rvm_meta_updated="2009.09.03"
16
16
  }
17
17
 
18
18
  function __rvm_version { __rvm_meta ; echo "rvm $rvm_meta_version ($rvm_meta_updated) [$rvm_meta_website]" ; }
@@ -43,10 +43,12 @@ function __rvm_usage {
43
43
  uninstall - Uninstall a ruby version
44
44
  reset - Remove default and current settings, exit the shell.
45
45
  (If you experience odd behavior try this first)
46
- reload - Reload rvm source itself (useful after changing rvm source)
47
46
  rubydo - Used with -f to run a ruby file against specified or all rubies
48
47
  debug - Emit environment & configuration information for *current* ruby
48
+
49
+ reload - Reload rvm source itself (useful after changing rvm source)
49
50
  implode - Removes all ruby installations it manages, everything in ~/.rvm
51
+ update - Upgrades rvm to the latest version.
50
52
 
51
53
  Implementation:
52
54
 
@@ -63,7 +65,7 @@ function __rvm_usage {
63
65
  -l|--level - Patch level for the specified Ruby version
64
66
  -p|--prefix - Package and source directory prefix, with trailing slash!
65
67
  Default is a users home directory and /usr/local/ for root
66
- -c|--configure - Options for source compile (default: --enable-shared)
68
+ -c|--configure - Options for source compile (default: --enable-shared=true)
67
69
  -a|--archives - Directory to place downladed files into (~/.rvm/archives/)
68
70
  -n|--nice - Niceness level (default: 0)
69
71
  -m|--gem-set - Named gem set for switching between different gem sets
@@ -87,6 +89,7 @@ function __rvm_usage {
87
89
  -h|--help - Emit this output and exit
88
90
  -d|--default - Set the default Ruby to a specified version
89
91
  -m|--gem-set - Use a named gem set instead of the default set.
92
+ --all - Used with 'rvm list' to list "most" installable versions.
90
93
  --rm-gem-set - Remove a named gem set
91
94
  --jit - Enable JIT for the Rubinius build
92
95
  --force - Force install, removes old install & source directories.
@@ -109,20 +112,18 @@ function __rvm_log {
109
112
  debug) shift ; echo -e "\n\033[0;35m <d> $* \033[0m" ;;
110
113
  info) shift ; echo -e "\n\033[0;32m <i> $* \033[0m" ;;
111
114
  warn) shift ; echo -e "\n\033[0;33m <w> $* \033[0m" ;;
112
- fail) shift ; echo -e "\n\033[0;31m <e> $* \033[0m" ; return 1 ;;
115
+ fail) shift ; echo -e "\n\033[0;31m <e> $* \033[0m" ; popd 2> /dev/null ; return 1 ;;
113
116
  *) echo -e "$*"
114
117
  esac
115
118
  }
116
119
 
117
120
  function __rvm_clean-path {
118
- PATH=`echo $PATH | tr -s ':' '\n' | awk '!($0 in a){a[$0];print}' | tr -s '\n' ':'`
119
- PATH="${PATH%:}"
121
+ PATH=`echo $PATH | tr -s ':' '\n' | awk '!($0 in a){a[$0];print}' | tr -s '\n' ':' | sed 's/:$//'`
120
122
  export PATH
121
123
  }
122
124
 
123
125
  function __rvm_remove-from-path {
124
- PATH=`echo $PATH | tr -s ':' '\n' | grep -v "\.rvm" | tr -s '\n' ':'`
125
- PATH="${PATH%:}"
126
+ PATH=`echo $PATH | tr -s ':' '\n' | grep -v "\.rvm" | tr -s '\n' ':' | sed 's/:$//'`
126
127
  export PATH
127
128
  }
128
129
 
@@ -183,11 +184,16 @@ function __rvm_set-defaults {
183
184
 
184
185
  function __rvm_initialize {
185
186
 
186
- rvm_curl=`which curl`
187
+ rvm_fetch=`which curl`
187
188
  if [ $? -ne 0 ] ; then
188
- __rvm_log "fail" "rvm expects that curl is available, which curl shows no curl :("
189
+ rvm_fetch=`which wget`
190
+ if [ $? -ne 0 ] ; then
191
+ rvm_fetch="wget -q -c "
192
+ else
193
+ __rvm_log "fail" "rvm expects either curl or wget, neither seem to be in your path :("
194
+ fi
189
195
  else
190
- rvm_curl="$rvm_curl -O -L -s -C - "
196
+ rvm_fetch="$rvm_fetch -O -L -s -C - "
191
197
  fi
192
198
 
193
199
  rvm_niceness=${rvm_niceness:-0}
@@ -227,11 +233,11 @@ function __rvm_initialize {
227
233
  mkdir -p $rvm_source_path $rvm_bin_path $rvm_archives_path
228
234
  }
229
235
 
230
- function __rvm_curl {
236
+ function __rvm_fetch {
231
237
 
232
238
  pushd $rvm_archives_path > /dev/null
233
- eval $rvm_curl "$1"
234
- popd > /dev/null
239
+ eval $rvm_fetch "$1"
240
+ popd 2> /dev/null
235
241
 
236
242
  }
237
243
 
@@ -239,91 +245,93 @@ function __rvm_install-source {
239
245
 
240
246
  if [ -z "$rvm_selected" ] ; then __rvm_select $* ; fi
241
247
 
242
- __rvm_log "info" "Installing Ruby from source to: $rvm_install_path/$rvm_ruby_package_name"
243
- mkdir -p $rvm_log_path/$rvm_ruby_package_name
248
+ __rvm_log "info" "Installing Ruby from source to: $rvm_ruby_home"
249
+ mkdir -p $rvm_ruby_log_path
244
250
 
245
251
  pushd $rvm_source_path > /dev/null
246
252
 
247
253
  if [ ! -z "$rvm_force" ] ; then
248
- rm -rf $rvm_install_path/$rvm_ruby_package_name
249
- rm -rf $rvm_source_path/$rvm_ruby_package_name
254
+ rm -rf $rvm_ruby_home
255
+ rm -rf $rvm_ruby_src_path
250
256
  fi
251
257
 
252
258
  if [ -z "$rvm_ruby_tag" -a -z "$rvm_ruby_rev" ] ; then
253
- if [ ! -d $rvm_source_path/$rvm_ruby_package_name ] ; then
259
+ if [ ! -d $rvm_ruby_src_path ] ; then
254
260
  rvm_url="${rvm_url:-"ftp://ftp.ruby-lang.org/pub/ruby/1.$rvm_major_version/$rvm_ruby_package_name.tar.gz"}"
255
261
  __rvm_log "info" "\tDownloading $rvm_ruby_package_name, this may take a while depending on your connection..."
256
- __rvm_curl $rvm_url
257
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; fi
262
+ __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
258
264
 
259
265
  __rvm_log "info" "\tExtracting $rvm_ruby_package_name ..."
260
- mkdir -p $rvm_source_path/$rvm_ruby_package_name
266
+ mkdir -p $rvm_ruby_src_path
261
267
  nice -n $rvm_niceness tar xzf $rvm_archives_path/$rvm_ruby_package_name.tar.gz -C $rvm_source_path
262
268
  fi
263
269
  else
264
- if [ -z "$rvm_ruby_rev" ] ; then
265
- # TODO: Check if tag v is valid
266
- rvm_url=$rvm_ruby_repo_url/tags/$rvm_ruby_tag
267
- rvm_rev=""
268
- else
269
- if [ "$rvm_ruby_rev" = "head" -o "$rvm_ruby_rev" = "trunk" ] ; then
270
- rvm_url=$rvm_ruby_repo_url/branches/ruby_1_${rvm_major_version}_${rvm_minor_version}
271
- rvm_rev=""
272
- else
273
- rvm_url=$rvm_ruby_repo_url/branches/ruby_1_${rvm_major_version}_${rvm_minor_version}
274
- rvm_rev="-r $rvm_ruby_rev"
275
- fi
276
- fi
277
-
278
270
  __rvm_log "info" "\tRetrieving Ruby from $rvm_url"
279
271
  if [ ! -z "`echo $rvm_url | grep '^git'`" ] ; then
280
- if [ -d "$rvm_source_path/$rvm_ruby_package_name/.git" ] ; then
281
- cd $rvm_source_path/$rvm_ruby_package_name
272
+ if [ -d "$rvm_ruby_src_path/.git" ] ; then
273
+ cd $rvm_ruby_src_path
282
274
  if [ -z "$rvm_ruby_rev" ] ; then
283
275
  git pull origin master
284
276
  else
285
277
  git checkout ${rvm_ruby_rev:-HEAD}
286
278
  fi
287
279
  else
288
- git clone --depth 1 $rvm_ruby_repo_url $rvm_source_path/$rvm_ruby_package_name
280
+ git clone --depth 1 $rvm_ruby_repo_url $rvm_ruby_src_path
289
281
  fi
290
282
  else
291
- if [ -d "$rvm_source_path/$rvm_ruby_package_name/.svn" ] ; then
292
- cd $rvm_source_path/$rvm_ruby_package_name
283
+ if [ -z "$rvm_ruby_rev" ] ; then
284
+ # TODO: Check if tag v is valid
285
+ rvm_url=$rvm_ruby_repo_url/tags/$rvm_ruby_tag
286
+ rvm_rev=""
287
+ else
288
+ if [ "$rvm_ruby_rev" = "head" -o "$rvm_ruby_rev" = "trunk" ] ; then
289
+ rvm_url=$rvm_ruby_repo_url/branches/ruby_1_${rvm_major_version}_${rvm_minor_version}
290
+ rvm_rev=""
291
+ else
292
+ rvm_url=$rvm_ruby_repo_url/branches/ruby_1_${rvm_major_version}_${rvm_minor_version}
293
+ rvm_rev="-r $rvm_ruby_rev"
294
+ fi
295
+ fi
296
+
297
+ if [ -d "$rvm_ruby_src_path/.svn" ] ; then
298
+ cd $rvm_ruby_src_path
293
299
  svn checkout -q $rvm_rev
294
300
  else
295
- svn checkout -q $rvm_rev --force $rvm_url $rvm_source_path/$rvm_ruby_package_name
301
+ svn checkout -q $rvm_rev --force $rvm_url $rvm_ruby_src_path
296
302
  fi
297
303
  fi
298
304
  fi
299
- cd $rvm_source_path/$rvm_ruby_package_name
300
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; fi
301
- if [ ! -s $rvm_source_path/$rvm_ruby_package_name/Makefile -a "$rvm_ruby_interpreter" = "ruby" ] ; then autoconf ; fi
302
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; fi
305
+ cd $rvm_ruby_src_path
306
+ 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
308
+ 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
303
309
  if [ -s ./configure ] ; then
304
- __rvm_log "info" "\tConfiguring $rvm_ruby_package_name using ${rvm_ruby_configure:-"--enable-shared"}, this may take a while depending on your cpu(s)..."
305
- 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
306
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; fi
310
+ __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
+ __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
307
315
  else
308
316
  __rvm_log "warn" "\tSkipping configure step, ./configure file does not exist."
309
317
  fi
310
318
 
311
319
  __rvm_log "info" "\tCompiling $rvm_ruby_package_name, this may take a while, depending on your cpu(s)..."
312
320
  if [ -z "$rvm_ruby_make" ] ; then
313
- nice -n $rvm_niceness make > $rvm_log_path/$rvm_ruby_package_name/make.log 2> $rvm_log_path/$rvm_ruby_package_name/make.error.log
321
+ nice -n $rvm_niceness make > $rvm_ruby_log_path/make.log 2> $rvm_ruby_log_path/make.error.log
314
322
  else
315
- 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
323
+ nice -n $rvm_niceness $rvm_ruby_make > $rvm_ruby_log_path/install.log 2> $rvm_ruby_log_path/install.error.log
316
324
  fi
317
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; 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
318
326
  if [ -z "$rvm_ruby_make" ] ; then
319
327
  __rvm_log "info" "\tInstalling $rvm_ruby_package_name"
320
- 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
328
+ nice -n $rvm_niceness make install > $rvm_ruby_log_path/install.log 2> $rvm_ruby_log_path/install.error.log
321
329
  else
322
- 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
330
+ nice -n $rvm_niceness $rvm_ruby_make_install > $rvm_ruby_log_path/install.log 2> $rvm_ruby_log_path/install.error.log
323
331
  fi
324
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; 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
325
333
 
326
- chmod +x $rvm_install_path/$rvm_ruby_package_name/bin/*
334
+ chmod +x $rvm_ruby_home/bin/*
327
335
 
328
336
  ruby_wrapper=$(cat <<-RubyWrapper
329
337
  #!/bin/bash
@@ -345,38 +353,48 @@ RubyWrapper
345
353
  if [ -d $rvm_source_path/$rvm_gem_package_name ] ; then
346
354
  cd $rvm_source_path/$rvm_gem_package_name
347
355
  else
348
- __rvm_curl $rvm_gem_url
349
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; fi
356
+ __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
350
358
  mkdir -p $rvm_source_path/$rvm_gem_package_name
351
359
  nice -n $rvm_niceness tar zxf $rvm_archives_path/$rvm_gem_package_name.tgz -C $rvm_source_path
352
360
  fi
353
361
  # Well this is fun... fix nil error on require_paths:
354
362
  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
355
363
 
356
- nice -n $rvm_niceness $rvm_install_path/$rvm_ruby_package_name/bin/ruby $rvm_source_path/$rvm_gem_package_name/setup.rb > $rvm_log_path/$rvm_ruby_package_name/rubygems.install.log 2> $rvm_log_path/$rvm_ruby_package_name/rubygems.install.error.log
357
- popd > /dev/null
358
-
359
- for binary in gem irb erb ri rdoc testrb ; do
360
- sed -i.orig "2i\\
361
- ENV[\"GEM_HOME\"]=\"$rvm_gem_home\"
362
- ENV[\"PATH\"]=\"$rvm_ruby_home/bin:$rvm_gem_home/bin:\"
363
-
364
- " $rvm_install_path/$rvm_ruby_package_name/bin/$binary
365
- done
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
365
+ popd 2> /dev/null
366
366
 
367
- __rvm_log "info" "Installation of rubygems for $rvm_ruby_package_name is complete."
368
367
 
369
368
  for rvm_gem_name in rake ; do
370
369
  __rvm_log "info" "Installing $rvm_gem_name"
371
- 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
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
371
  done
373
372
 
374
- sed -i.orig "2i\\
375
- ENV[\"GEM_HOME\"]=\"$rvm_gem_home\"
376
- ENV[\"PATH\"]=\"$rvm_ruby_home/bin:$rvm_gem_home/bin:\"
373
+ for binary in gem irb erb ri rdoc testrb rake ; do
374
+ if [ -x $rvm_ruby_home/bin/$binary ] ; then
375
+ string="ENV['GEM_HOME']='$rvm_gem_home'\nENV['PATH']='$rvm_ruby_home/bin:$rvm_gem_home/bin'"
376
+ awk "NR==2 {print \"$string\"} {print}" $rvm_ruby_home/bin/$binary > $rvm_ruby_home/bin/$binary.new
377
+ mv $rvm_ruby_home/bin/$binary.new $rvm_ruby_home/bin/$binary
378
+ chmod +x $rvm_ruby_home/bin/$binary
379
+ else
380
+ __rvm_log "warn" "$rvm_ruby_home/bin/$binary is missing"
381
+ fi
382
+ done
377
383
 
378
- " $rvm_gem_home/bin/rake
384
+ __rvm_log "info" "Installation of rubygems for $rvm_ruby_package_name is complete."
385
+ if [ -x $rvm_gem_home/bin/$binary ] ; then
386
+ string="ENV['GEM_HOME']='$rvm_gem_home'\nENV['PATH']='$rvm_ruby_home/bin:$rvm_gem_home/bin'"
387
+ mv $rvm_gem_home/bin/$binary $rvm_gem_home/bin/$binary.orig
388
+ 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
390
+ else
391
+ __rvm_log "warn" "$rvm_gem_home/bin/$binary is missing"
392
+ fi
379
393
 
394
+ binary=rake
395
+ mv $rvm_gem_home/bin/$binary $rvm_gem_home/bin/$binary.orig
396
+ awk "NR==2 {print \"$string\"} {print}" $rvm_gem_home/bin/$binary.orig > $rvm_gem_home/bin/$binary
397
+ unset binary
380
398
  }
381
399
 
382
400
  function __rvm_install-ruby {
@@ -395,17 +413,17 @@ function __rvm_install-ruby {
395
413
  rvm_ruby_make_install="rake framework:install framework_instdir=$rvm_install_path/macruby-head framework_name=/macruby-head --trace"
396
414
  rvm_ruby_rev="${rvm_ruby_rev:-head}" # Hard coding this for now
397
415
 
398
- DESTDIR="$rvm_install_path/$rvm_ruby_package_name" ; export DESTDIR
416
+ DESTDIR="$rvm_ruby_home" ; export DESTDIR
399
417
  if [ -z "$rvm_ruby_rev" ] ; then
400
418
  # TODO: Check if tag v is valid
401
- rvm_ruby_repo_url=$rvm_ruby_repo_url/tags/$rvm_ruby_tag
402
- rvm_ruby_rev=""
419
+ #rvm_ruby_repo_url=$rvm_ruby_repo_url/tags/$rvm_ruby_tag
420
+ rvm_ruby_rev="head" # For now, until nightly release are available.
403
421
  else
404
422
  if [ "$rvm_ruby_rev" = "head" -o "$rvm_ruby_rev" = "trunk" ] ; then
405
- rvm_ruby_repo_url=$rvm_ruby_repo_url/trunk
406
- rvm_ruby_rev=""
423
+ #rvm_ruby_repo_url=$rvm_ruby_repo_url/trunk
424
+ rvm_ruby_rev="head"
407
425
  else
408
- rvm_ruby_repo_url=$rvm_ruby_repo_url/trunk
426
+ #rvm_ruby_repo_url=$rvm_ruby_repo_url/trunk
409
427
  rvm_ruby_rev="-r $rvm_ruby_rev"
410
428
  fi
411
429
  fi
@@ -418,29 +436,29 @@ function __rvm_install-ruby {
418
436
 
419
437
  ruby-enterprise|ree)
420
438
  rvm_url="http://rubyforge.org/frs/download.php/58677/$rvm_ruby_package_name.tar.gz"
421
- __rvm_log "info" "Installing Ruby Enterprise Edition from source to: $rvm_install_path/$rvm_ruby_package_name"
439
+ __rvm_log "info" "Installing Ruby Enterprise Edition from source to: $rvm_ruby_home"
422
440
  pushd $rvm_source_path > /dev/null
423
- if [ -d $rvm_source_path/$rvm_ruby_package_name ] ; then
424
- cd $rvm_source_path/$rvm_ruby_package_name
441
+ if [ -d $rvm_ruby_src_path ] ; then
442
+ cd $rvm_ruby_src_path
425
443
  else
426
444
  __rvm_log "info" "\tDownloading $rvm_ruby_package_name, this may take a while depending on your connection..."
427
- __rvm_curl $rvm_url
428
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; fi
445
+ __rvm_fetch $rvm_url
446
+ 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
429
447
  __rvm_log "info" "\tExtracting $rvm_ruby_package_name..."
430
- mkdir -p $rvm_source_path/$rvm_ruby_package_name
448
+ mkdir -p $rvm_ruby_src_path
431
449
  nice -n $rvm_niceness tar xzf $rvm_archives_path/$rvm_ruby_package_name.tar.gz -C $rvm_source_path
432
450
  fi
433
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; 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
434
452
 
435
453
  __rvm_log "info" "\tInstalling $rvm_ruby_package_name, this may take a while, depending on your cpu(s)..."
436
- mkdir -p $rvm_log_path/$rvm_ruby_package_name
454
+ mkdir -p $rvm_ruby_log_path
437
455
 
438
- cd $rvm_source_path/$rvm_ruby_package_name
439
- 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
440
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; fi
441
- chmod +x $rvm_install_path/$rvm_ruby_package_name/bin/*
456
+ 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
459
+ chmod +x $rvm_ruby_home/bin/*
442
460
 
443
- ln -fs $rvm_install_path/$rvm_ruby_package_name/bin/ruby $rvm_install_path/bin/$rvm_ruby_package_name
461
+ ln -fs $rvm_ruby_home/bin/ruby $rvm_install_path/bin/$rvm_ruby_package_name
444
462
 
445
463
  __rvm_log "info" "\tInstalling rubygems dedicated to $rvm_ruby_package_name..."
446
464
  rvm_gem_package_name="rubygems-1.3.5"
@@ -448,26 +466,27 @@ function __rvm_install-ruby {
448
466
  if [ -d $rvm_source_path/$rvm_gem_package_name ] ; then
449
467
  cd $rvm_source_path/$rvm_gem_package_name
450
468
  else
451
- __rvm_curl $rvm_gem_url
452
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; fi
469
+ __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
453
471
  mkdir -p $rvm_source_path/$rvm_gem_package_name
454
472
  nice -n $rvm_niceness tar zxf $rvm_archives_path/$rvm_gem_package_name.tgz -C $rvm_source_path
455
473
  fi
456
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; 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
457
475
  # Well this is fun... fix nil error on require_paths:
458
- 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
476
+ 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
459
477
 
460
- nice -n $rvm_niceness $rvm_install_path/$rvm_ruby_package_name/bin/ruby $rvm_source_path/$rvm_gem_package_name/setup.rb > $rvm_log_path/$rvm_ruby_package_name/rubygems.install.log 2> $rvm_log_path/$rvm_ruby_package_name/rubygems.install.error.log
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
461
479
  __rvm_log "info" "Installation of $rvm_ruby_package_name complete."
462
- popd > /dev/null
480
+ popd 2> /dev/null
463
481
 
464
482
  for rvm_gem_name in rake ; do
465
483
  __rvm_log "info" "Installing $rvm_gem_name"
466
- 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
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
467
485
  done
468
486
  ;;
469
487
 
470
488
  rbx|rubinius)
489
+ __rvm_reset # Requires 1.8 to install due to parsetree. TOOD: Check for 1.8 + parse-tree
471
490
  rvm_ruby_repo_url=$rvm_rubinius_repo_url
472
491
  rvm_ruby_configure=""
473
492
  rvm_ruby_make="rake"
@@ -479,7 +498,7 @@ function __rvm_install-ruby {
479
498
  git clone --depth 1 $rvm_ruby_repo_url $rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version
480
499
  fi
481
500
  cd $rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version && $rvm_rubinius_jit rake build
482
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; fi
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
483
502
  for binary in ruby irb ; do
484
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
485
504
  done
@@ -490,49 +509,50 @@ function __rvm_install-ruby {
490
509
  rvm_url="http://dist.codehaus.org/$rvm_ruby_interpreter/$rvm_ruby_version/$rvm_package_file.zip"
491
510
  rvm_jruby_repo_url="${rvm_jruby_repo_url:-"git://kenai.com/jruby~main"}"
492
511
 
493
- __rvm_log "info" "Installing jRuby to: $rvm_install_path/$rvm_ruby_package_name"
494
- mkdir -p $rvm_log_path/$rvm_ruby_package_name
512
+ __rvm_log "info" "Installing jRuby to: $rvm_ruby_home"
513
+ mkdir -p $rvm_ruby_log_path
495
514
  pushd $rvm_source_path > /dev/null
496
515
 
497
516
 
498
517
  if [ ! -z "$rvm_ruby_rev" ] ; then
499
518
  if [ ! -d $rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version -o ! -d $rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version/.git ] ; then
500
- git clone --depth 1 $rvm_jruby_repo_url $rvm_source_path/$rvm_ruby_package_name
501
- cd $rvm_source_path/$rvm_ruby_package_name && ant
519
+ git clone --depth 1 $rvm_jruby_repo_url $rvm_ruby_src_path
520
+ cd $rvm_ruby_src_path && ant
502
521
  fi
503
522
  else
504
- if [ -d $rvm_source_path/$rvm_ruby_package_name ] ; then
505
- cd $rvm_source_path/$rvm_ruby_package_name
523
+ if [ -d $rvm_ruby_src_path ] ; then
524
+ cd $rvm_ruby_src_path
506
525
  else
507
526
  __rvm_log "info" "\tDownloading $rvm_package_file, this may take a while depending on your connection..."
508
- __rvm_curl $rvm_url
527
+ __rvm_fetch $rvm_url
509
528
  __rvm_log "info" "\tExtracting $rvm_package_file..."
510
529
  nice -n $rvm_niceness unzip -q $rvm_archives_path/$rvm_package_file.zip -d $rvm_source_path
511
- cd $rvm_source_path/$rvm_ruby_package_name
530
+ cd $rvm_ruby_src_path
512
531
  fi
513
532
  fi
514
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; 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
515
534
 
516
535
  __rvm_log "info" "\tInstalling $rvm_ruby_package_name..."
517
- mkdir -p $rvm_install_path/$rvm_ruby_package_name/bin/
518
- rsync -ag $rvm_source_path/$rvm_ruby_package_name/ $rvm_install_path/$rvm_ruby_package_name/
519
- if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_log_path/$rvm_ruby_package_name/*.error.log" ; return 1 ; fi
520
- 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
521
- popd > /dev/null
522
- chmod +x $rvm_install_path/$rvm_ruby_package_name/bin/*
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
540
+ popd 2> /dev/null
541
+ chmod +x $rvm_ruby_home/bin/*
523
542
  for binary in jruby jgem jirb ; do
524
- ln -fs $rvm_install_path/$rvm_ruby_package_name/bin/$binary $rvm_install_path/$rvm_ruby_package_name/bin/${binary#j}
543
+ ln -fs $rvm_ruby_home/bin/$binary $rvm_ruby_home/bin/${binary#j}
525
544
  done
526
545
 
527
- ln -fs $rvm_install_path/$rvm_ruby_package_name/bin/ruby $rvm_install_path/bin/$rvm_ruby_package_name
546
+ ln -fs $rvm_ruby_home/bin/ruby $rvm_install_path/bin/$rvm_ruby_package_name
528
547
 
529
548
  for rvm_gem_name in rake jruby-openssl ; do
530
549
  __rvm_log "info" "Installing $rvm_gem_name"
531
- nice -n $rvm_niceness $rvm_install_path/$rvm_ruby_package_name/bin/jgem 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
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
532
551
  done
533
552
  ;;
534
553
 
535
554
  ruby)
555
+ if [ -z "rvm_ruby_configure" ] ; then rvm_ruby_configure="--enable-shared=true" ; fi
536
556
  __rvm_install-source $*
537
557
  ;;
538
558
 
@@ -692,8 +712,10 @@ function __rvm_select {
692
712
  rvm_ruby_package_name="${rvm_ruby_package_name:-"$rvm_ruby_interpreter-$rvm_ruby_version-$rvm_ruby_patch_level"}"
693
713
  rvm_ruby_home="${rvm_ruby_home:-"$rvm_install_path/$rvm_ruby_interpreter-$rvm_ruby_version-$rvm_ruby_patch_level"}"
694
714
  fi
695
- rvm_ruby_irbrc="$rvm_ruby_home/.irbrc"
715
+ rvm_ruby_log_path="$rvm_log_path/$rvm_ruby_package_name"
716
+ rvm_ruby_src_path="$rvm_source_path/$rvm_ruby_package_name"
696
717
  rvm_ruby_binary="$rvm_ruby_home/bin/ruby"
718
+ rvm_ruby_irbrc="$rvm_ruby_home/.irbrc"
697
719
  rvm_selected=1
698
720
  else
699
721
  unset rvm_selected
@@ -783,10 +805,22 @@ function __rvm_symlinks {
783
805
 
784
806
  function __rvm_list {
785
807
 
786
- echo -e "\nruby:\n$(/bin/ls -l $rvm_install_path/ | awk '/ ruby-[1-2].*/ { print " - " $NF }')\n"
787
- echo -e "jruby:\n$(/bin/ls -l $rvm_install_path/ | awk '/jruby-.*/ { print " - " $NF }')\n"
788
- echo -e "ree:\n$(/bin/ls $rvm_install_path/ | awk '/ruby-enterprise-.*/ { print " - " $NF }')\n"
789
- echo -e "system:\n - ($($default_system_ruby -v))\n"
808
+ if [ "$rvm_all" ] ; then
809
+ svn list http://svn.ruby-lang.org/repos/ruby/tags/ | grep 'v1_[8|9]' | sed 's/^v1_//' | sed 's/\/$//' | awk -F'_' '{print "1."$1"."$2 " -l "$3}' | sed 's/p$//'
810
+
811
+ echo "jruby 1.2.0"
812
+ echo "jruby 1.3.0"
813
+ echo "jruby 1.3.1"
814
+ echo "jruby head"
815
+ echo "rubinius head"
816
+ echo "rbx head"
817
+ echo "ree 20090610"
818
+ else
819
+ echo -e "\nruby:\n$(/bin/ls -l $rvm_install_path/ | awk '/ ruby-[1-2].*/ { print " - " $NF }')\n"
820
+ echo -e "jruby:\n$(/bin/ls -l $rvm_install_path/ | awk '/jruby-.*/ { print " - " $NF }')\n"
821
+ echo -e "ree:\n$(/bin/ls $rvm_install_path/ | awk '/ruby-enterprise-.*/ { print " - " $NF }')\n"
822
+ echo -e "system:\n - ($($default_system_ruby -v))\n"
823
+ fi
790
824
 
791
825
  }
792
826
 
@@ -832,12 +866,10 @@ function __rvm_src-dir {
832
866
 
833
867
  if [ -z "$rvm_selected" ] ; then __rvm_select $* ; fi
834
868
 
835
- if [ "$rvm_ruby_interpreter" -a "$rvm_ruby_version" ] ; then
836
- rvm_ruby_source_dir="$rvm_source_path/$rvm_ruby_interpreter-$rvm_ruby_version-$rvm_ruby_patch_level"
837
- mkdir -p $rvm_ruby_source_dir
838
- echo "$rvm_ruby_source_dir"
839
- else
869
+ if [ -z "$rvm_ruby_src_path" ] ; then
840
870
  __rvm_log "fail" "No source directory exists for the default implementation."
871
+ else
872
+ echo "$rvm_ruby_src_path"
841
873
  fi
842
874
 
843
875
  }
@@ -870,9 +902,13 @@ function __rvm_gem-dup {
870
902
 
871
903
  }
872
904
 
873
- function __rvm_execute {
874
- if [ -z "$rvm_selected" ] ; then __rvm_select $* ; fi
875
- $rvm_ruby_home/bin/ruby $rvm_ruby_args
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
876
912
  }
877
913
 
878
914
  function __rvm_cache {
@@ -901,7 +937,7 @@ function __rvm_cache {
901
937
  }
902
938
 
903
939
  function __rvm_cleanup-variables {
904
- unset rvm_selected rvm_action rvm_ruby_interpreter rvm_ruby_patch_level rvm_ruby_version rvm_irbrc_file rvm_ruby_irbrc rvm_source_path rvm_install_path rvm_debug rvm_prefix_path rvm_ruby_package_name rvm_gem_path rvm_command rvm_error_message IRBRC rvm_ruby_home rvm_ruby_binary rvm_gem_set_name rvm_delete_flag rvm_ruby_tag rvm_ruby_rev rvm_url rvm_ruby_make rvm_ruby_make_install rvm_config_path rvm_bin_path rvm_force rvm_set_prompt
940
+ unset rvm_selected rvm_action rvm_ruby_interpreter rvm_ruby_patch_level rvm_ruby_version rvm_irbrc_file rvm_ruby_irbrc rvm_source_path rvm_install_path rvm_debug rvm_prefix_path rvm_ruby_package_name rvm_gem_path rvm_command rvm_error_message IRBRC rvm_ruby_home rvm_ruby_binary rvm_gem_set_name rvm_delete_flag rvm_ruby_tag rvm_ruby_rev rvm_url rvm_ruby_make rvm_ruby_make_install rvm_config_path rvm_bin_path rvm_force rvm_set_prompt rvm_all
905
941
  }
906
942
 
907
943
  function __rvm_get-user-defaults {
@@ -913,13 +949,15 @@ function __rvm_parse-args {
913
949
  while [ $# -gt 0 ] ; do
914
950
  rvm_token="$1" ; shift
915
951
  case "$rvm_token" in
916
- install|uninstall|path|info|setup|version|srcdir|list|symlinks|reset|debug|reload|usage|help|implode)
952
+ install|uninstall|path|info|setup|version|srcdir|list|symlinks|reset|debug|reload|usage|help|implode|update)
917
953
  rvm_action=$rvm_token
918
954
  ;;
919
955
  use)
920
956
  rvm_action=$rvm_token
921
- if [ "$1" = "default" -o -z "$1" ] ; then
957
+ if [ "$1" = "default" ] ; then
922
958
  rvm_ruby_interpreter="system" ; shift
959
+ elif [ -z "$1" ] ; then
960
+ rvm_ruby_interpreter="system"
923
961
  fi
924
962
  ;;
925
963
 
@@ -1009,7 +1047,7 @@ function __rvm_parse-args {
1009
1047
  -G|--gems) rvm_gem_path="$1" ; shift ;;
1010
1048
  -C|--configure)
1011
1049
  if [ ! -z "$1" ] ; then
1012
- rvm_ruby_configure="$(echo $1 | tr ',-' ' -')"
1050
+ rvm_ruby_configure="$(echo $1 | tr ',' ' ')"
1013
1051
  shift
1014
1052
  else
1015
1053
  rvm_action="error"
@@ -1024,9 +1062,11 @@ function __rvm_parse-args {
1024
1062
  -f|--file) rvm_ruby_args="$1" ; shift ;;
1025
1063
  -h|--help) rvm_action=help ; shift ;;
1026
1064
  -d|--default) rvm_set_default=1 ;;
1065
+ --head) rvm_ruby_rev="head" ;;
1027
1066
  --trace|--debug) rvm_debug=1 ;;
1028
1067
  --force) rvm_force=1 ;;
1029
1068
  --set-prompt) rvm_set_prompt=1 ;;
1069
+ --all) rvm_all=1 ; shift ;;
1030
1070
  -m|--gem-set) rvm_gem_set_name="$1" ; shift ;;
1031
1071
  --rm-gem-set) rvm_gem_set_name_rm="$1" ; shift ;;
1032
1072
  --jit) rvm_rubinius_jit="RBX_LLVM=1" ;;
@@ -1043,7 +1083,7 @@ function __rvm_parse-args {
1043
1083
  if [ ! -z "$rvm_ruby_args" -o ! -z "$rvm_error_message" ] ; then break; fi
1044
1084
  done
1045
1085
 
1046
- if [ ! -z "$rvm_error_message" ] ; then return 1 ; fi
1086
+ if [ ! -z "$rvm_error_message" ] ; then popd 2> /dev/null ; return 1 ; fi
1047
1087
  if [ -z "$rvm_debug" ] ; then set +x ; else set -x ; fi
1048
1088
 
1049
1089
  }
@@ -1100,7 +1140,20 @@ function rvm {
1100
1140
  # TODO: how can we use bin_path here for reload, default file?
1101
1141
  reload) source ~/.rvm/scripts/rvm ;;
1102
1142
  implode) __rvm_implode ;;
1103
- error) __rvm_log "fail" "$rvm_error_message ( see: rvm usage )" ; return 1; ;;
1143
+ update)
1144
+ if [ "$rvm_ruby_rev" = "head" ] ; then
1145
+ if [ -d $rvm_source_path/rvm/.git ] ; then
1146
+ cd $rvm_source_path/rvm/ && git pull origin master
1147
+ else
1148
+ cd $rvm_source_path && git clone git://github.com/wayneeseguin/rvm.git && cd rvm/
1149
+ fi
1150
+ ./scripts/rvm-update
1151
+ else
1152
+ # TODO: rvm_install_path:
1153
+ gem install rvm --no-rdoc --no-ri -q && rvm-update && source ~/.rvm/scripts/rvm
1154
+ fi
1155
+ ;;
1156
+ error) __rvm_log "fail" "$rvm_error_message ( see: rvm usage )" ; popd 2> /dev/null ; return 1; ;;
1104
1157
  info|debug)
1105
1158
  __rvm_version
1106
1159
  cat <<-Info
data/scripts/rvm-install CHANGED
@@ -24,7 +24,8 @@ done
24
24
  for file in ~/.bash_profile ~/.bashrc ~/.zshrc ; do
25
25
  if [ -s $file ] ; then
26
26
  echo -e "\n\033[0;33m<w>\033[0m Ensuring that rvm script location in $file is scripts/rvm not bin/rvm"
27
- sed -i.orig 's/rvm\/bin\/rvm/rvm\/scripts\/rvm/g' $file
27
+ actual_file=$(file ~/.zshrc | awk '{print $5}')
28
+ sed -i.orig 's/rvm\/bin\/rvm/rvm\/scripts\/rvm/g' $actual_file
28
29
  fi
29
30
  done
30
31
 
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.30
4
+ version: 0.0.31
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-02 00:00:00 -07:00
12
+ date: 2009-09-03 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -35,6 +35,7 @@ files:
35
35
  - scripts/rvm-update
36
36
  has_rdoc: false
37
37
  homepage: http://github.com/wayneeseguin/rvm
38
+ licenses:
38
39
  post_install_message:
39
40
  rdoc_options:
40
41
  - --inline-source
@@ -56,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
56
57
  requirements: []
57
58
 
58
59
  rubyforge_project: dynamicreports
59
- rubygems_version: 1.2.0
60
+ rubygems_version: 1.3.5
60
61
  signing_key:
61
62
  specification_version: 3
62
63
  summary: Ruby Version Manager (rvm)