rvm 0.0.86 → 0.0.87

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.
data/binscripts/rvm ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env bash
2
+
3
+ if [[ -f /etc/rvmrc ]] ; then source /etc/rvmrc ; fi
4
+ if [[ -f "$HOME/.rvmrc" ]] ; then source "$HOME/.rvmrc" ; fi
5
+ if [[ -z "$rvm_path" ]] ; then unset rvm_path ; fi
6
+
7
+ if [[ -z "$rvm_path" ]] ; then
8
+ if [[ "root" = "$(whoami)" ]] ; then
9
+ rvm_path="${rvm_path:-/usr/local/rvm}"
10
+ else
11
+ rvm_path="${rvm_path:-$HOME/.rvm}"
12
+ fi
13
+ fi
14
+
15
+ source $rvm_path/scripts/rvm
16
+ rvm "$*"
data/install CHANGED
@@ -26,7 +26,7 @@ source_dir="${source_dir:-$cwd}"
26
26
 
27
27
  # State what is required to use rvm
28
28
  echo -e "\n$(tput setaf 2)rvm$(tput sgr0) - shell scripts that allows a user to manage multiple ruby versions in their own account."
29
- echo -e "\n Installing to $rvm_path..."
29
+ echo -e "\n Prepairing $rvm_path ..."
30
30
  for dir_name in src scripts bin log archives config gems examples ; do
31
31
  mkdir -p "$rvm_path/$dir_name"
32
32
  done
@@ -35,6 +35,7 @@ cp -f "$source_dir/README" "$rvm_path/"
35
35
  #
36
36
  # Scripts
37
37
  #
38
+ echo -e "\n Installing rvm to $rvm_path/ ..."
38
39
  rm -rf $rvm_path/scripts # Clear the old scripts directory so that the old style rvm- scripts are cleared out.
39
40
  for dir_name in config scripts examples lib hooks ; do
40
41
  mkdir -p "$rvm_path/$dir_name"
@@ -46,47 +47,49 @@ done ; unset dir_name
46
47
  #
47
48
  # Bin Scripts
48
49
  #
49
- cp -Rf "$source_dir/binscripts/" $rvm_path/bin
50
+ echo -e "\n Installing bin scripts to $rvm_path/bin ..."
51
+ # Cleanse and purge...
52
+ rm -f $rvm_path/bin/rvm ; rm -rf $rvm_path/bin/binscripts
53
+ for file in rvm-prompt rvm ; do
54
+ cp -f "$source_dir/binscripts/$file" $rvm_path/bin/
55
+ done
50
56
  chmod +x $rvm_path/bin/*
51
- ln -nfs $rvm_path/scripts/rvm $rvm_path/bin/rvm
52
57
 
53
58
  #
54
59
  # RC Files
55
60
  #
61
+ echo -e "\n Checking rc files ($rvm_rc_files) ..."
56
62
  if [[ "$rvm_loaded_flag" != "1" ]] ; then
57
63
  for rcfile in $(echo $rvm_rc_files) ; do
58
64
  if [[ ! -f $rcfile ]] ; then touch $rcfile ; fi
59
- if [[ -z "$(awk "/scripts\/rvm/" $rcfile)" ]] ; then
65
+
66
+ grep "scripts\/rvm" "$rcfile" > /dev/null 2>&1
67
+ if [[ $? -gt 0 ]] ; then
60
68
  echo " Adding 'if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi' to $rcfile."
61
69
  echo -e "\n# rvm-install added line:\nif [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi\n" >> $rcfile
62
- else
63
- : # it exists... remove it and append at the end
64
70
  fi
65
71
  done
66
72
  fi
67
73
 
68
74
  if [[ "root" = "$(whoami)" ]] ; then
69
- ln -nfs $rvm_path/scripts/rvm /usr/local/bin/rvm
70
- else
71
- ln -nfs $rvm_path/scripts/rvm $rvm_path/bin/rvm
75
+ echo -e "\n Symlinking rvm to $rvm_symlink_path/rvm ..."
76
+ ln -nfs $rvm_path/bin/rvm $rvm_symlink_path/rvm
77
+ chmod +x $rvm_symlink_path/rvm
72
78
  fi
73
- chmod +x $rvm_path/scripts/rvm
74
79
 
75
80
  #
76
81
  # System Checks
77
82
  #
78
83
  $rvm_path/scripts/notes
79
84
 
80
- echo -e " $item In order to use rvm the following line must occur in your shell's loading files, after all path/variable settings.:"
81
- echo -e " $item if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
82
- echo -e " $item CLOSE THIS SHELL AND OPEN A NEW ONE in order to use rvm."
85
+ echo -e " $item In order to use rvm the following line must occur in your shell's loading files, after all path/variable settings:"
86
+ echo -e "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
87
+ echo -e "\n $item CLOSE THIS SHELL AND OPEN A NEW ONE in order to use rvm."
83
88
 
84
89
  echo -e "\n$(tput setaf 2)RTFM:\n $(tput sgr0) http://rvm.beginrescueend.com/ \n"
85
90
  echo -e "$(tput setaf 2)w⦿‿⦿t!$(tput sgr0)"
86
91
  echo -e "\n ~ Wayne\n"
87
92
 
88
- if [[ -x "$rvm_path/scripts/rvm" ]] ; then
89
- "$rvm_path/scripts/rvm" -v
90
- fi
93
+ if [[ -x "$rvm_path/bin/rvm" ]] ; then "$rvm_path/bin/rvm" -v ; fi
91
94
 
92
95
  exit 0
data/lib/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 0
4
- :patch: 86
4
+ :patch: 87
data/rvm.gemspec CHANGED
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
2
+ # DO NOT EDIT THIS FILE
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rvm}
8
- s.version = "0.0.86"
8
+ s.version = "0.0.87"
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-11-30}
12
+ s.date = %q{2009-12-02}
13
13
  s.default_executable = %q{rvm-install}
14
14
  s.description = %q{Manages Ruby interpreter installations and switching between them.}
15
15
  s.email = %q{wayneeseguin@gmail.com}
@@ -20,6 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.files = [
21
21
  "LICENCE",
22
22
  "README",
23
+ "binscripts/rvm",
23
24
  "binscripts/rvm-prompt",
24
25
  "config/db",
25
26
  "config/md5",
@@ -34,6 +35,7 @@ Gem::Specification.new do |s|
34
35
  "rvm.gemspec",
35
36
  "scripts/aliases",
36
37
  "scripts/array",
38
+ "scripts/cd",
37
39
  "scripts/cli",
38
40
  "scripts/color",
39
41
  "scripts/completion",
@@ -75,4 +77,3 @@ Gem::Specification.new do |s|
75
77
  else
76
78
  end
77
79
  end
78
-
data/scripts/cd ADDED
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Source a .rvmrc file in a directory after changing to it, if it exists.
4
+ cd() {
5
+ builtin cd "$@"
6
+ if [[ "$rvm_project_rvmrc" != 0 ]] ; then
7
+ local cwd ; cwd=$(pwd)
8
+ while : ; do
9
+ if [[ -f "$cwd/.rvmrc" ]] ; then source "$cwd/.rvmrc" ; break ; fi
10
+ cwd=$(dirname $cwd)
11
+ if [[ -z "$cwd" ]] || [[ "$HOME" = "$cwd" ]] || [[ "/" = "$cwd" ]] ; then
12
+ if [[ "$rvm_project_rvmrc_default" != 0 ]] ; then
13
+ rvm default 1>/dev/null 2>&1
14
+ fi
15
+ break
16
+ fi
17
+ done
18
+ fi
19
+ }
20
+
data/scripts/cli CHANGED
@@ -17,7 +17,7 @@ __rvm_parse_args() {
17
17
  while [[ $# -gt 0 ]] ; do
18
18
  rvm_token="$1" ; shift
19
19
  case "$rvm_token" in
20
- install|uninstall|path|info|setup|version|srcdir|list|reset|debug|reload|implode|readline|update|iconv|curl|openssl|ncurses|zlib|readline|monitor|notes)
20
+ fetch|install|uninstall|path|info|setup|version|srcdir|list|reset|debug|reload|implode|readline|update|iconv|curl|openssl|ncurses|zlib|readline|monitor|notes)
21
21
  rvm_action=$rvm_token
22
22
  ;;
23
23
 
@@ -151,6 +151,19 @@ __rvm_parse_args() {
151
151
  shift
152
152
  ;;
153
153
 
154
+ # For use with --patch
155
+ --patch-name) rvm_ruby_patch_name="$1" ; shift ;;
156
+
157
+ -h|--patch)
158
+ if [[ -z "$rvm_ruby_patch" ]] ; then
159
+ rvm_ruby_patch="$1";
160
+ else
161
+ rvm_ruby_patch="$rvm_ruby_patch,$1";
162
+ fi
163
+ rvm_action="${rvm_action:-use}"
164
+ shift
165
+ ;;
166
+
154
167
  --head)
155
168
  if [[ -z "$rvm_ruby_string" ]] ; then rvm_ruby_string="head"; else rvm_ruby_string="${rvm_ruby_string}-head" ; fi
156
169
  rvm_ruby_revision="head"
@@ -316,6 +329,8 @@ __rvm_parse_args() {
316
329
  if [[ ! -z "$rvm_parse_break" ]] || [[ ! -z "$rvm_error_message" ]] ; then unset rvm_parse_break; break; fi
317
330
  done
318
331
 
332
+ while [[ $# -gt 0 ]] ; do shift ; done
333
+
319
334
  if [[ ! -z "$rvm_error_message" ]] ; then __rvm_pushpop ; return 1 ; fi
320
335
  }
321
336
 
@@ -358,8 +373,8 @@ rvm() {
358
373
  $rvm_scripts_path/monitor ; result=$?
359
374
  ;;
360
375
  notes) $rvm_scripts_path/notes ; result=$? ;;
361
- reload) rvm_reload_flag=1 ; break ;;
362
- install|uninstall) __rvm_manage_rubies ; result=$? ;;
376
+ reload) rvm_reload_flag=1 ;;
377
+ fetch|install|uninstall) __rvm_manage_rubies ; result=$? ;;
363
378
  tests|specs) rvm_action="rake" ; __rvm_do ; result=$? ;;
364
379
 
365
380
  iconv|openssl|ncurses|zlib|readline|curl)
@@ -388,7 +403,6 @@ rvm() {
388
403
  result=1
389
404
  esac
390
405
 
391
-
392
406
  if [[ "$rvm_reload_flag" -eq 1 ]] ; then source "$rvm_path/scripts/rvm" ; fi
393
407
 
394
408
  if [[ "1" = "$rvm_trace_flag" ]] ; then set +x ; unset rvm_trace_flag ; fi
@@ -396,4 +410,3 @@ rvm() {
396
410
  return $result
397
411
  }
398
412
 
399
-
data/scripts/gems CHANGED
@@ -176,7 +176,7 @@ __rvm_gems_load() {
176
176
  #
177
177
  if [[ -z "$rvm_force_flag" ]] && [[ -f "${rvm_ruby_gem_home}/specifications/${gem_file_name}spec" ]] ; then
178
178
  unset gem
179
- $rvm_scripts_path/log "warn" "$($rvm_scripts_path/color "yellow")$gem_name $gem_version$($rvm_scripts_path/color "none") exists, skipping (--force to re-install)"
179
+ $rvm_scripts_path/log "info" "$($rvm_scripts_path/color "green")$gem_name $gem_version$($rvm_scripts_path/color "none") exists, skipping (--force to re-install)"
180
180
  else
181
181
  if [[ -f "$gem" ]] ; then
182
182
  cache_file="$gem"
@@ -218,7 +218,7 @@ __rvm_gems_load() {
218
218
  if [[ ! -z "$gem" ]] ; then
219
219
  # TODO: Set vars if fourth field is non-empty (means that there are conditional statements to execute in the gem install line.
220
220
  __rvm_make_flags
221
- $rvm_scripts_path/log "info" "Installing $gem_name $gem_version..."
221
+ $rvm_scripts_path/log "warn" "$gem_name $gem_version is not installed, installing..."
222
222
  if [[ ! -z "$rvm_ruby_gem_home" ]] ; then
223
223
  command="GEM_HOME='$rvm_ruby_gem_home' GEM_PATH='$rvm_ruby_gem_home' $gem_prefix $rvm_ruby_home/bin/gem install --no-rdoc --no-ri -q $gem $gem_postfix $vars"
224
224
  else
data/scripts/initialize CHANGED
@@ -6,6 +6,8 @@ else
6
6
  rvm_rc_files="$HOME/.bash_profile $HOME/.bashrc $HOME/.zshrc"
7
7
  fi
8
8
 
9
+ rvm_project_rvmrc="${rvm_project_rvmrc:-1}"
10
+ rvm_project_rvmrc_default="${rvm_project_rvmrc_default:-1}"
9
11
  rvm_scripts_path="${rvm_scripts_path:-"$rvm_path/scripts"}"
10
12
  rvm_archives_path="${rvm_archives_path:-"$rvm_path/archives"}"
11
13
  rvm_src_path="${rvm_src_path:-"$rvm_path/src"}"
@@ -15,6 +17,7 @@ rvm_gem_path="${rvm_gem_path:-"$rvm_path/gems"}"
15
17
  rvm_config_path="${rvm_config_path:-"$rvm_path/config"}"
16
18
  rvm_hooks_path="${rvm_hooks_path:-"$rvm_path/hooks"}"
17
19
  rvm_tmp_path="${rvm_tmp_path:-"$rvm_path/tmp"}"
20
+ rvm_symlink_path="${rvm_symlink_path:-/usr/local/bin}"
18
21
 
19
22
  export rvm_path rvm_scripts_path rvm_archives_path rvm_src_path rvm_log_path rvm_bin_path rvm_gem_path rvm_config_path rvm_tmp_path
20
23
 
data/scripts/install CHANGED
@@ -26,7 +26,7 @@ source_dir="${source_dir:-$cwd}"
26
26
 
27
27
  # State what is required to use rvm
28
28
  echo -e "\n$(tput setaf 2)rvm$(tput sgr0) - shell scripts that allows a user to manage multiple ruby versions in their own account."
29
- echo -e "\n Installing to $rvm_path..."
29
+ echo -e "\n Prepairing $rvm_path ..."
30
30
  for dir_name in src scripts bin log archives config gems examples ; do
31
31
  mkdir -p "$rvm_path/$dir_name"
32
32
  done
@@ -35,6 +35,7 @@ cp -f "$source_dir/README" "$rvm_path/"
35
35
  #
36
36
  # Scripts
37
37
  #
38
+ echo -e "\n Installing rvm to $rvm_path/ ..."
38
39
  rm -rf $rvm_path/scripts # Clear the old scripts directory so that the old style rvm- scripts are cleared out.
39
40
  for dir_name in config scripts examples lib hooks ; do
40
41
  mkdir -p "$rvm_path/$dir_name"
@@ -46,47 +47,49 @@ done ; unset dir_name
46
47
  #
47
48
  # Bin Scripts
48
49
  #
49
- cp -Rf "$source_dir/binscripts/" $rvm_path/bin
50
+ echo -e "\n Installing bin scripts to $rvm_path/bin ..."
51
+ # Cleanse and purge...
52
+ rm -f $rvm_path/bin/rvm ; rm -rf $rvm_path/bin/binscripts
53
+ for file in rvm-prompt rvm ; do
54
+ cp -f "$source_dir/binscripts/$file" $rvm_path/bin/
55
+ done
50
56
  chmod +x $rvm_path/bin/*
51
- ln -nfs $rvm_path/scripts/rvm $rvm_path/bin/rvm
52
57
 
53
58
  #
54
59
  # RC Files
55
60
  #
61
+ echo -e "\n Checking rc files ($rvm_rc_files) ..."
56
62
  if [[ "$rvm_loaded_flag" != "1" ]] ; then
57
63
  for rcfile in $(echo $rvm_rc_files) ; do
58
64
  if [[ ! -f $rcfile ]] ; then touch $rcfile ; fi
59
- if [[ -z "$(awk "/scripts\/rvm/" $rcfile)" ]] ; then
65
+
66
+ grep "scripts\/rvm" "$rcfile" > /dev/null 2>&1
67
+ if [[ $? -gt 0 ]] ; then
60
68
  echo " Adding 'if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi' to $rcfile."
61
69
  echo -e "\n# rvm-install added line:\nif [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi\n" >> $rcfile
62
- else
63
- : # it exists... remove it and append at the end
64
70
  fi
65
71
  done
66
72
  fi
67
73
 
68
74
  if [[ "root" = "$(whoami)" ]] ; then
69
- ln -nfs $rvm_path/scripts/rvm /usr/local/bin/rvm
70
- else
71
- ln -nfs $rvm_path/scripts/rvm $rvm_path/bin/rvm
75
+ echo -e "\n Symlinking rvm to $rvm_symlink_path/rvm ..."
76
+ ln -nfs $rvm_path/bin/rvm $rvm_symlink_path/rvm
77
+ chmod +x $rvm_symlink_path/rvm
72
78
  fi
73
- chmod +x $rvm_path/scripts/rvm
74
79
 
75
80
  #
76
81
  # System Checks
77
82
  #
78
83
  $rvm_path/scripts/notes
79
84
 
80
- echo -e " $item In order to use rvm the following line must occur in your shell's loading files, after all path/variable settings.:"
81
- echo -e " $item if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
82
- echo -e " $item CLOSE THIS SHELL AND OPEN A NEW ONE in order to use rvm."
85
+ echo -e " $item In order to use rvm the following line must occur in your shell's loading files, after all path/variable settings:"
86
+ echo -e "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
87
+ echo -e "\n $item CLOSE THIS SHELL AND OPEN A NEW ONE in order to use rvm."
83
88
 
84
89
  echo -e "\n$(tput setaf 2)RTFM:\n $(tput sgr0) http://rvm.beginrescueend.com/ \n"
85
90
  echo -e "$(tput setaf 2)w⦿‿⦿t!$(tput sgr0)"
86
91
  echo -e "\n ~ Wayne\n"
87
92
 
88
- if [[ -x "$rvm_path/scripts/rvm" ]] ; then
89
- "$rvm_path/scripts/rvm" -v
90
- fi
93
+ if [[ -x "$rvm_path/bin/rvm" ]] ; then "$rvm_path/bin/rvm" -v ; fi
91
94
 
92
95
  exit 0
data/scripts/monitor CHANGED
@@ -46,9 +46,12 @@ while : ; do
46
46
 
47
47
  if [[ -d "$framework/" ]] ; then
48
48
 
49
- files=($(\ls ${framework}/**/*_${framework}.rb) $(ls ${framework}/*_${framework}.rb))
50
- for file in "${files[@]}" ; do
51
- push_if_timestamp_changed $file $framework
49
+ #files=($(\ls ${framework}/**/*_${framework}.rb) $(ls ${framework}/*_${framework}.rb))
50
+ #for file in "${files[@]}" ; do
51
+ for file in ${framework}/**/*_${framework}.rb ${framework}/*_${framework}.rb ; do
52
+ if [[ -f "$file" ]] ; then
53
+ push_if_timestamp_changed $file $framework
54
+ fi
52
55
  done
53
56
 
54
57
  if [[ "$(array_length "changed_${framework}_files")" -gt 0 ]] ; then
@@ -4,74 +4,15 @@ __rvm_install_source() {
4
4
  if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select $* ; fi
5
5
  $rvm_scripts_path/log "info" "Installing Ruby from source to: $rvm_ruby_home"
6
6
  mkdir -p "$rvm_ruby_log_path"
7
-
8
7
  __rvm_pushpop "$rvm_src_path"
9
-
10
- if [[ ! -z "$rvm_force_flag" ]] ; then
11
- rm -rf "$rvm_ruby_home" "$rvm_ruby_src_path"
12
- fi
8
+ if [[ ! -z "$rvm_force_flag" ]] ; then rm -rf "$rvm_ruby_home" "$rvm_ruby_src_path" ; fi
13
9
 
14
10
  result=0
15
- # TODO: This really should be about the url instead of this hokey logic.
16
- if [[ -z "$rvm_head_flag" ]] && [[ -z "$rvm_ruby_tag" ]] && [[ -z "$rvm_ruby_revision" ]] ; then
17
- if [[ ! -f "$rvm_archives_path/$rvm_ruby_package_name.tar.gz" ]] ; then
18
- rvm_url="${rvm_url:-"ftp://ftp.ruby-lang.org/pub/ruby/1.$rvm_major_version/$rvm_ruby_package_name.tar.gz"}"
19
- $rvm_scripts_path/log "info" "Downloading $rvm_ruby_package_name, this may take a while depending on your connection..."
20
- $rvm_scripts_path/fetch "$rvm_url"
21
- result=$? ; if [[ "$result" -gt 0 ]] ; then return $result ; fi
22
- fi
23
- #mkdir -p "$rvm_ruby_src_path" # Is this line necessary considering -C below? v
24
- __rvm_run "extract" "tar xzf $rvm_archives_path/$rvm_ruby_package_name.tar.gz -C $rvm_src_path" "Extracting $rvm_ruby_package_name ..."
25
- if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
26
- else
27
- if [[ ! -z "$(echo $rvm_url | awk '/^git/')" ]] ; then
28
- if [[ -d "$rvm_ruby_src_path/.git" ]] ; then
29
- builtin cd $rvm_ruby_src_path
30
- if [[ -z "$rvm_ruby_revision" ]] ; then
31
- $rvm_scripts_path/log "info" "Pulling from $rvm_ruby_repo_url, this may take a while depending on your connection..."
32
- git pull origin master
33
- if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
34
- else
35
- if [[ -z "$rvm_ruby_sha" ]] ; then
36
- git checkout HEAD
37
- else
38
- git checkout $(echo $rvm_ruby_sha | sed 's#^s##')
39
- fi
40
- if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
41
- fi
42
- else
43
- $rvm_scripts_path/log "info" "Cloning from $rvm_ruby_repo_url, this may take a while depending on your connection..."
44
- git clone --depth 1 $rvm_ruby_repo_url $rvm_ruby_src_path
45
- if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
46
- fi
47
- else
48
- if [[ ! -z "$rvm_head_flag" ]] || [[ "trunk" = "$rvm_ruby_revision" ]] ; then
49
- rvm_url="$rvm_ruby_repo_url/trunk"
50
- rvm_rev=""
51
- elif [[ ! -z "$rvm_ruby_tag" ]] ; then
52
- # TODO: Check if tag v is valid
53
- rvm_url="$rvm_ruby_repo_url/tags/$(echo $rvm_ruby_tag | sed 's/^t//')"
54
- rvm_rev=""
55
- else
56
- rvm_url=$rvm_ruby_repo_url/branches/ruby_1_${rvm_major_version}_${rvm_minor_version}
57
- rvm_rev="-$rvm_ruby_revision"
58
- fi
11
+ __rvm_fetch_ruby
12
+ if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
59
13
 
60
- if [[ -d "$rvm_ruby_src_path/.svn" ]] ; then
61
- builtin cd $rvm_ruby_src_path
62
- $rvm_scripts_path/log "info" "Updating ruby from $rvm_url"
63
- __rvm_run "svn.update" "svn update"
64
- if [[ ! -z "$rvm_rev" ]] ; then
65
- $rvm_scripts_path/log "info" "Checking out revision ${rvm_rev/-r/-r } from $rvm_url"
66
- __rvm_run "svn.checkout" "svn update -q ${rvm_rev/-r/-r }"
67
- fi
68
- else
69
- rm -rf $rvm_ruby_src_path
70
- __rvm_run "svn.checkout" "svn checkout -q ${rvm_rev/-r/-r } $rvm_url $rvm_ruby_src_path"
71
- fi
72
- if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
73
- fi
74
- fi
14
+ __rvm_run "extract" "tar xzf $rvm_archives_path/$rvm_ruby_package_file.tar.gz -C $rvm_src_path" "Extracting $rvm_ruby_package_file ..."
15
+ if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
75
16
 
76
17
  builtin cd $rvm_ruby_src_path
77
18
  if [[ $? -gt 0 ]] ; then result=$? ; $rvm_scripts_path/log "error" "There was an error, please check $rvm_ruby_log_path/*.error.log" ; __rvm_pushpop ; return $result ; fi
@@ -89,22 +30,28 @@ __rvm_install_source() {
89
30
  __rvm_run "configure" "$rvm_ruby_configure"
90
31
  if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
91
32
  elif [[ -s ./configure ]] ; then
92
- __rvm_run "configure" "./configure --prefix=$rvm_ruby_home $rvm_ruby_configure_flags $configure_parameters" "Configuring $rvm_ruby_package_name, this may take a while depending on your cpu(s)..."
33
+ __rvm_run "configure" "./configure --prefix=$rvm_ruby_home $rvm_ruby_configure_flags $configure_parameters" "Configuring $rvm_ruby_string, this may take a while depending on your cpu(s)..."
93
34
  if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
94
35
  unset configure_parameters
95
36
  else
96
37
  $rvm_scripts_path/log "error" "Skipping configure step, 'configure' script does not exist, did autoconf not run successfully?"
97
38
  fi
98
39
 
40
+ if [[ ! -z "$rvm_ruby_patch" ]] ; then
41
+ for patch in $(echo $rvm_ruby_patch | tr ',' ' ') ; do
42
+ patch -p1 $patch
43
+ done
44
+ fi
45
+
99
46
  rvm_ruby_make=${rvm_ruby_make:-"make"}
100
- __rvm_run "make" "$rvm_ruby_make $rvm_make_flags" "Compiling $rvm_ruby_package_name, this may take a while, depending on your cpu(s)..."
47
+ __rvm_run "make" "$rvm_ruby_make $rvm_make_flags" "Compiling $rvm_ruby_string, this may take a while, depending on your cpu(s)..."
101
48
  if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
102
49
 
103
50
  rvm_ruby_make_install=${rvm_ruby_make_install:-"make install"}
104
- __rvm_run "install" "$rvm_ruby_make_install" "Installing $rvm_ruby_package_name"
51
+ __rvm_run "install" "$rvm_ruby_make_install" "Installing $rvm_ruby_string"
105
52
  if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
106
53
 
107
- $rvm_scripts_path/log "info" "Installation of $rvm_ruby_package_name is complete."
54
+ $rvm_scripts_path/log "info" "Installation of $rvm_ruby_string is complete."
108
55
 
109
56
  GEM_HOME="$rvm_ruby_gem_home" ; export GEM_HOME
110
57
  GEM_PATH="$rvm_ruby_gem_home" ; export GEM_PATH
@@ -160,7 +107,7 @@ PATH="$rvm_ruby_home/bin:$rvm_ruby_gem_home/bin:\$PATH" ; export PATH
160
107
  exec $macruby_path/mac$binary_name $prefix "\$@"
161
108
  RubyWrapper
162
109
  )
163
- files="$rvm_ruby_home/bin/$binary_name $rvm_path/bin/$binary_name-$rvm_ruby_package_name"
110
+ files="$rvm_ruby_home/bin/$binary_name $rvm_path/bin/$binary_name-$rvm_ruby_string"
164
111
  for file_name in $(echo $files) ; do
165
112
  rm -f $file_name
166
113
  echo "$ruby_wrapper" > $file_name
@@ -215,7 +162,7 @@ RubyWrapper
215
162
  __rvm_inject_gem_env "$rvm_ruby_gem_home/bin/rake"
216
163
 
217
164
  __rvm_irbrc
218
- __rvm_bin_scripts
165
+ __rvm_bin_script
219
166
  __rvm_post_install
220
167
  __rvm_pushpop
221
168
  else
@@ -237,14 +184,14 @@ RubyWrapper
237
184
  echo "$(export rvm_install_on_use_flag=1 ; rvm 1.8.7)" # This should install if missing.
238
185
  # TODO: use 'rvm gems load' here:
239
186
  unset CFLAGS LDFLAGS ARCHFLAGS # Important.
240
- # __rvm_unset_ruby_variables ; rvm_ruby_string="rbx-head" ; __rvm_select
187
+ __rvm_unset_ruby_variables ; rvm_ruby_string="rbx-head" ; __rvm_select
241
188
 
242
189
  unset GEM_HOME GEM_PATH MY_RUBY_HOME IRBRC
243
190
  PATH=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
244
191
  PATH=$rvm_bin_path:$PATH ; export PATH
245
192
 
246
193
  if [[ ! -z "$(echo $rvm_ruby_version | awk '/^1\.0/')" ]] && [[ -z "$rvm_head_flag" ]] ; then
247
- if [[ ! -f "$rvm_archives_path/$rvm_ruby_package_name.tar.gz" ]] ; then
194
+ if [[ ! -f "$rvm_archives_path/$rvm_ruby_package_file.tar.gz" ]] ; then
248
195
  $rvm_scripts_path/log "info" "Downloading $rvm_ruby_file, this may take a while depending on your connection..."
249
196
  $rvm_scripts_path/fetch "$rvm_url"
250
197
  result=$? ; if [[ "$result" -gt 0 ]] ; then return $result ; fi
@@ -253,7 +200,7 @@ RubyWrapper
253
200
  if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
254
201
  mv $rvm_src_path/rubinius-$rvm_ruby_version $rvm_ruby_src_path
255
202
  else
256
- rvm_ruby_repo_url="$rvm_rubinius_repo_url"
203
+ __rvm_db "rubinius_repo_url" "rvm_ruby_repo_url"
257
204
  #rvm_ruby_home="$rvm_path/$rvm_ruby_interpreter-$rvm_ruby_version"
258
205
  if [[ ! -d "$rvm_ruby_src_path" ]] || [[ ! -d "$rvm_ruby_src_path/.git" ]] ; then
259
206
  rm -rf "$rvm_ruby_src_path" ; builtin cd "$rvm_home"
@@ -315,7 +262,7 @@ PATH="$rvm_ruby_home/bin:$rvm_ruby_gem_home/bin:\$PATH" ; export PATH
315
262
  exec $rvm_ruby_home/bin/rbx $prefix $binary_name "\$@"
316
263
  RubyWrapper
317
264
  )
318
- files="$rvm_ruby_home/bin/$binary_name $rvm_path/bin/$binary_name-$rvm_ruby_package_name"
265
+ files="$rvm_ruby_home/bin/$binary_name $rvm_path/bin/$binary_name-$rvm_ruby_string"
319
266
  for file_name in $(echo $files) ; do
320
267
  rm -f $file_name
321
268
  echo "$ruby_wrapper" > $file_name
@@ -337,51 +284,21 @@ RubyWrapper
337
284
  fi ; unset binary
338
285
 
339
286
  __rvm_irbrc
340
- __rvm_bin_scripts
287
+ __rvm_bin_script
341
288
  ;;
342
289
 
343
290
  jruby)
344
291
  mkdir -p "$rvm_ruby_log_path" "$rvm_ruby_src_path"
345
292
  __rvm_pushpop $rvm_src_path
346
293
 
347
- if [[ "$rvm_head_flag" -eq 1 ]] || [[ ! -z "$rvm_ruby_revision" ]] ; then
348
- if [[ -d "$rvm_ruby_src_path/.git" ]] ; then
349
- builtin cd "$rvm_ruby_src_path"
350
- if [[ -z "$rvm_ruby_revision" ]] ; then
351
- $rvm_scripts_path/log "info" "Pulling from $rvm_ruby_repo_url, this may take a while depending on your connection..."
352
- git pull origin master
353
- if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
354
- else
355
- if [[ -z "$rvm_ruby_sha" ]] ; then
356
- git checkout HEAD
357
- else
358
- git checkout $(echo $rvm_ruby_sha | sed 's#^s##')
359
- fi
360
- if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
361
- fi
362
- else
363
- rm -rf "$rvm_ruby_src_path"
364
- $rvm_scripts_path/log "info" "Cloning from $rvm_ruby_repo_url, this may take a while depending on your connection..."
365
- git clone --depth 1 "$rvm_ruby_repo_url" "$rvm_ruby_src_path"
366
- if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
367
- fi
294
+ __rvm_fetch_ruby
295
+ if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
368
296
 
369
- builtin cd "$rvm_ruby_src_path"
370
- ant dist
371
- else
372
- if [[ -z "$rvm_force_flag" ]] && [[ -f $rvm_package_file ]] && [[ -s $rvm_package_file ]] ; then
373
- $rvm_scripts_path/log "info" "It appears that $rvm_package_file has already been downloaded, skipping. Use --force to force re-download."
374
- else
375
- $rvm_scripts_path/log "info" "Downloading $rvm_package_file, this may take a while depending on your connection..."
376
- $rvm_scripts_path/fetch "$rvm_url"
377
- result=$? ; if [[ "$result" -gt 0 ]] ; then return $result ; fi
378
- fi
379
- __rvm_run "extract" "tar zxf $rvm_archives_path/$rvm_package_file.tar.gz -C $rvm_src_path" "Extracting $rvm_package_file..."
380
- if [[ "$rvm_package_file" != "$rvm_ruby_string" ]] ; then
381
- mv "$rvm_src_path/$rvm_package_file" "$rvm_src_path/$rvm_ruby_string"
382
- fi
383
- builtin cd "$rvm_ruby_src_path"
384
- fi
297
+ __rvm_run "extract" "tar xzf $rvm_archives_path/$rvm_ruby_package_file.tar.gz -C $rvm_src_path" "Extracting $rvm_ruby_package_file ..."
298
+ if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
299
+
300
+ builtin cd "$rvm_ruby_src_path"
301
+ if [[ "$rvm_head_flag" -eq 1 ]] || [[ ! -z "$rvm_ruby_revision" ]] ; then ant dist ; fi
385
302
 
386
303
  mkdir -p "$rvm_ruby_home/bin/"
387
304
  builtin cd "$rvm_ruby_src_path/tool/nailgun" && /usr/bin/make $rvm_make_flags
@@ -398,13 +315,16 @@ RubyWrapper
398
315
  done ; unset binary
399
316
  __rvm_pushpop
400
317
 
401
- for binary in rake rdoc ri spec autospec \
402
- testrb jrubyc jirb_swing jirb jgem ast generate_yaml_index.rb; do
318
+ for binary in rake rdoc ri spec autospec testrb ast generate_yaml_index.rb ; do
403
319
  __rvm_inject_ruby_shebang $rvm_ruby_home/bin/$binary
404
320
  __rvm_inject_gem_env $rvm_ruby_home/bin/$binary
405
321
  chmod +x $rvm_ruby_home/bin/$binary
406
322
  done ; unset binary
407
323
 
324
+ for binary in jrubyc jirb_swing jirb jgem ; do
325
+ __rvm_inject_gem_env $rvm_ruby_home/bin/$binary
326
+ done
327
+
408
328
  __rvm_rubygems_setup
409
329
  __rvm_irbrc
410
330
  __rvm_bin_script
@@ -449,7 +369,7 @@ RubyWrapper
449
369
  elif [[ ! -z "rvm_ruby_configure" ]] ; then
450
370
  $rvm_ruby_configure
451
371
  elif [[ -s ./configure ]] ; then
452
- __rvm_run "configure" "./configure --prefix=$rvm_ruby_home $rvm_ruby_configure_flags $configure_parameters" "Configuring $rvm_ruby_package_name using $rvm_ruby_configure_flags, this may take a while depending on your cpu(s)..."
372
+ __rvm_run "configure" "./configure --prefix=$rvm_ruby_home $rvm_ruby_configure_flags $configure_parameters" "Configuring $rvm_ruby_string using $rvm_ruby_configure_flags, this may take a while depending on your cpu(s)..."
453
373
  if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
454
374
  unset configure_parameters
455
375
  else
@@ -457,14 +377,14 @@ RubyWrapper
457
377
  fi
458
378
 
459
379
  rvm_ruby_make=${rvm_ruby_make:-"/usr/bin/make"}
460
- __rvm_run "make" "$rvm_ruby_make $rvm_make_flags" "Compiling $rvm_ruby_package_name, this may take a while, depending on your cpu(s)..."
380
+ __rvm_run "make" "$rvm_ruby_make $rvm_make_flags" "Compiling $rvm_ruby_string, this may take a while, depending on your cpu(s)..."
461
381
  if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
462
382
 
463
383
  rvm_ruby_make_install=${rvm_ruby_make_install:-"/usr/bin/make install"}
464
- __rvm_run "install" "$rvm_ruby_make_install" "Installing $rvm_ruby_package_name"
384
+ __rvm_run "install" "$rvm_ruby_make_install" "Installing $rvm_ruby_string"
465
385
  if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
466
386
 
467
- $rvm_scripts_path/log "info" "Installation of $rvm_ruby_package_name is complete."
387
+ $rvm_scripts_path/log "info" "Installation of $rvm_ruby_string is complete."
468
388
 
469
389
  GEM_HOME="$rvm_ruby_gem_home" ; export GEM_HOME
470
390
  GEM_PATH="$rvm_ruby_gem_home" ; export GEM_PATH
@@ -531,24 +451,95 @@ __rvm_manage_rubies() {
531
451
  if [[ ! -z "$rvm_json_flag" ]] ; then __rvm_json ; fi
532
452
  }
533
453
 
454
+ __rvm_fetch_ruby() {
455
+ if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select $* ; fi
456
+
457
+ if [[ -z "$rvm_head_flag" ]] && [[ -z "$rvm_ruby_tag" ]] && [[ -z "$rvm_ruby_revision" ]] ; then
458
+ rvm_ruby_package_name="${rvm_ruby_package_name:-"$rvm_ruby_string"}"
459
+ rvm_ruby_package_file="${rvm_ruby_package_file:-"$rvm_ruby_package_name"}"
460
+ if [[ ! -s "$rvm_archives_path/$rvm_ruby_package_file.tar.gz" ]] ; then
461
+ if [[ "ruby" = "$rvm_ruby_interpreter" ]] ; then
462
+ rvm_url="ftp://ftp.ruby-lang.org/pub/ruby/1.$rvm_major_version/$rvm_ruby_package_file.tar.gz"
463
+ elif [[ "ree" = "$rvm_ruby_interpreter" ]] ; then
464
+ rvm_url="$(__rvm_db "${rvm_ruby_interpreter}_${rvm_ruby_version}_url")/$rvm_ruby_package_file.tar.gz"
465
+ elif [[ "jruby" = "$rvm_ruby_interpreter" ]] ; then
466
+ rvm_url="$(__rvm_db "${rvm_ruby_interpreter}_url")/$rvm_ruby_version/$rvm_ruby_package_file.tar.gz"
467
+ else
468
+ rvm_url="$(__rvm_db "${rvm_ruby_interpreter}_url")/$rvm_ruby_package_file.tar.gz"
469
+ fi
470
+ $rvm_scripts_path/log "info" "Downloading $rvm_ruby_package_file, this may take a while depending on your connection..."
471
+ $rvm_scripts_path/fetch "$rvm_url"
472
+ result=$? ; if [[ "$result" -gt 0 ]] ; then return $result ; fi
473
+ fi
474
+ else
475
+ if [[ ! -z "$(echo $rvm_url | awk '/^git/')" ]] ; then
476
+ if [[ -d "$rvm_ruby_src_path/.git" ]] ; then
477
+ builtin cd $rvm_ruby_src_path
478
+ if [[ -z "$rvm_ruby_revision" ]] ; then
479
+ $rvm_scripts_path/log "info" "Pulling from $rvm_ruby_repo_url, this may take a while depending on your connection..."
480
+ git pull origin master
481
+ if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
482
+ else
483
+ if [[ -z "$rvm_ruby_sha" ]] ; then
484
+ git checkout HEAD
485
+ else
486
+ git checkout $(echo $rvm_ruby_sha | sed 's#^s##')
487
+ fi
488
+ if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
489
+ fi
490
+ else
491
+ $rvm_scripts_path/log "info" "Cloning from $rvm_ruby_repo_url, this may take a while depending on your connection..."
492
+ git clone --depth 1 $rvm_ruby_repo_url $rvm_ruby_src_path
493
+ if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
494
+ fi
495
+ else
496
+ if [[ ! -z "$rvm_head_flag" ]] || [[ "trunk" = "$rvm_ruby_revision" ]] ; then
497
+ rvm_url="${rvm_url:-"$rvm_ruby_repo_url/trunk"}"
498
+ rvm_rev=""
499
+ elif [[ ! -z "$rvm_ruby_tag" ]] ; then
500
+ # TODO: Check if tag v is valid
501
+ rvm_url="${rvm_url:-"$rvm_ruby_repo_url/tags/$(echo $rvm_ruby_tag | sed 's/^t//')"}"
502
+ rvm_rev=""
503
+ else
504
+ rvm_url="${rvm_url:-"$rvm_ruby_repo_url/branches/ruby_1_${rvm_major_version}_${rvm_minor_version}"}"
505
+ rvm_rev="-$rvm_ruby_revision"
506
+ fi
507
+
508
+ if [[ -d "$rvm_ruby_src_path/.svn" ]] ; then
509
+ builtin cd $rvm_ruby_src_path
510
+ $rvm_scripts_path/log "info" "Updating ruby from $rvm_url"
511
+ __rvm_run "svn.update" "svn update"
512
+ if [[ ! -z "$rvm_rev" ]] ; then
513
+ $rvm_scripts_path/log "info" "Checking out revision ${rvm_rev/-r/-r } from $rvm_url"
514
+ __rvm_run "svn.checkout" "svn update -q ${rvm_rev/-r/-r }"
515
+ fi
516
+ else
517
+ rm -rf $rvm_ruby_src_path
518
+ __rvm_run "svn.checkout" "svn checkout -q ${rvm_rev/-r/-r } $rvm_url $rvm_ruby_src_path"
519
+ fi
520
+ if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
521
+ fi
522
+ fi
523
+ }
524
+
534
525
  __rvm_uninstall_ruby() {
535
526
  if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select $* ; fi
536
527
 
537
- if [[ ! -z "$rvm_ruby_package_name" ]] ; then
528
+ if [[ ! -z "$rvm_ruby_string" ]] ; then
538
529
  for dir in $rvm_path ; do
539
- if [[ -d $dir/$rvm_ruby_package_name ]] ; then
540
- $rvm_scripts_path/log "info" "Removing $dir/$rvm_ruby_package_name..."
541
- rm -rf $dir/$rvm_ruby_package_name
530
+ if [[ -d $dir/$rvm_ruby_string ]] ; then
531
+ $rvm_scripts_path/log "info" "Removing $dir/$rvm_ruby_string..."
532
+ rm -rf $dir/$rvm_ruby_string
542
533
  else
543
- $rvm_scripts_path/log "info" "$dir/$rvm_ruby_package_name has already been removed."
534
+ $rvm_scripts_path/log "info" "$dir/$rvm_ruby_string has already been removed."
544
535
  fi
545
- if [[ -e $rvm_bin_path/$rvm_ruby_package_name ]] ; then
546
- rm -f $rvm_bin_path/$rvm_ruby_package_name
536
+ if [[ -e $rvm_bin_path/$rvm_ruby_string ]] ; then
537
+ rm -f $rvm_bin_path/$rvm_ruby_string
547
538
  fi
548
539
  done ; unset dir
549
540
  rm -rf $rvm_gem_path/$rvm_ruby_interpreter/$rvm_ruby_version*/
550
541
  else
551
- $rvm_scripts_path/log "fail" "Cannot uninstall unknown package '$rvm_ruby_package_name'"
542
+ $rvm_scripts_path/log "fail" "Cannot uninstall unknown package '$rvm_ruby_string'"
552
543
  fi
553
544
  }
554
545
 
@@ -559,7 +550,7 @@ __rvm_remove_ruby() {
559
550
  for dir in $rvm_src_path $rvm_path ; do
560
551
  if [[ -d $dir/$rvm_ruby_string ]] ; then
561
552
  $rvm_scripts_path/log "info" "Removing $dir/$rvm_ruby_string..."
562
- rm -rf $dir/$rvm_ruby_package_name
553
+ rm -rf $dir/$rvm_ruby_string
563
554
  else
564
555
  $rvm_scripts_path/log "info" "it seems that $dir/$rvm_ruby_string is already non existent."
565
556
  fi
@@ -568,7 +559,7 @@ __rvm_remove_ruby() {
568
559
  fi
569
560
  done ; unset dir
570
561
  else
571
- $rvm_scripts_path/log "fail" "Cannot uninstall unknown package '$rvm_ruby_package_name'"
562
+ $rvm_scripts_path/log "fail" "Cannot uninstall unknown package '$rvm_ruby_string'"
572
563
  fi
573
564
  }
574
565
 
@@ -587,13 +578,13 @@ __rvm_post_install() {
587
578
  fi
588
579
  done ; unset binary binaries
589
580
 
590
- $rvm_scripts_path/log "info" "Installing gems for $rvm_ruby_package_name."
581
+ $rvm_scripts_path/log "info" "Installing gems for $rvm_ruby_string."
591
582
 
592
583
  for rvm_gem_name in rake ; do
593
584
  __rvm_run "gems.install" "$rvm_ruby_home/bin/gem install $rvm_gem_name --no-rdoc --no-ri -q" "Installing $rvm_gem_name"
594
585
  done ; unset rvm_gem_name
595
586
 
596
- $rvm_scripts_path/log "info" "Installation of gems for $rvm_ruby_package_name is complete."
587
+ $rvm_scripts_path/log "info" "Installation of gems for $rvm_ruby_string is complete."
597
588
 
598
589
  binary=rake
599
590
  if [[ -x $rvm_ruby_gem_home/bin/$binary ]] ; then
@@ -618,7 +609,7 @@ __rvm_rubygems_setup() {
618
609
  elif [[ ! -z "$(echo $rvm_ruby_interpreter | awk '/^rbx|jruby/')" ]] ; then
619
610
  (($rvm_debug_flag)) && $rvm_scripts_path/log "debug" "Skipping rubygems update for $rvm_ruby_version"
620
611
  else
621
- $rvm_scripts_path/log "info" "Installing rubygems dedicated to $rvm_ruby_package_name..."
612
+ $rvm_scripts_path/log "info" "Installing rubygems dedicated to $rvm_ruby_string..."
622
613
  rvm_gem_package_name="rubygems-1.3.5"
623
614
  rvm_gem_url="http://rubyforge.org/frs/download.php/60718/$rvm_gem_package_name.tgz"
624
615
 
data/scripts/rvm CHANGED
@@ -5,6 +5,8 @@
5
5
  # http://gitub.com/wayneeseguin/rvm
6
6
 
7
7
  if [[ "$rvm_loaded_flag" != "1" ]] || [[ "$rvm_reload_flag" = "1" ]] ; then
8
+ unset rvm_reload_flag
9
+
8
10
  if [[ -f /etc/rvmrc ]] ; then source /etc/rvmrc ; fi
9
11
  if [[ -f "$HOME/.rvmrc" ]] ; then source "$HOME/.rvmrc" ; fi
10
12
  if [[ -z "$rvm_path" ]] ; then unset rvm_path ; fi
@@ -27,19 +29,14 @@ if [[ "$rvm_loaded_flag" != "1" ]] || [[ "$rvm_reload_flag" = "1" ]] ; then
27
29
  source $rvm_path/scripts/cli
28
30
  source $rvm_path/scripts/gems
29
31
  source $rvm_path/scripts/libraries
32
+ source $rvm_path/scripts/cd
30
33
 
31
- unset rvm_reload_flag ; rvm_loaded_flag=1
34
+ rvm_loaded_flag=1
32
35
 
33
36
  rvm_version="$(cat "${rvm_path}/lib/VERSION.yml" | tail -n 3 | sed 's/^.*: //g' | tr "\n" '.' | sed 's/\.$//')" ; export rvm_version
34
37
 
35
- if [[ -f "$rvm_path/default" ]] ; then source "$rvm_path/default" ; fi
36
-
37
- # Source a .rvmrc file in a directory after changing to it, if it exists.
38
- cd() { builtin cd "$@" ; if [[ -f .rvmrc ]] ; then source .rvmrc ; fi ; }
39
-
40
38
  alias rvm-restart="source '${rvm_path}/scripts/rvm'"
41
- fi
42
39
 
43
- # Ok now we determine if we were called or sourced... under assumption of course ;)
44
- if [[ $# -gt 0 ]] && [[ -z "$(echo "$*" | awk '/completion-/')" ]] ; then rvm "$*" ; fi
40
+ if [[ -f "$rvm_path/default" ]] ; then source "$rvm_path/default" ; fi
41
+ fi
45
42
 
data/scripts/rvm-install CHANGED
@@ -26,7 +26,7 @@ source_dir="${source_dir:-$cwd}"
26
26
 
27
27
  # State what is required to use rvm
28
28
  echo -e "\n$(tput setaf 2)rvm$(tput sgr0) - shell scripts that allows a user to manage multiple ruby versions in their own account."
29
- echo -e "\n Installing to $rvm_path..."
29
+ echo -e "\n Prepairing $rvm_path ..."
30
30
  for dir_name in src scripts bin log archives config gems examples ; do
31
31
  mkdir -p "$rvm_path/$dir_name"
32
32
  done
@@ -35,6 +35,7 @@ cp -f "$source_dir/README" "$rvm_path/"
35
35
  #
36
36
  # Scripts
37
37
  #
38
+ echo -e "\n Installing rvm to $rvm_path/ ..."
38
39
  rm -rf $rvm_path/scripts # Clear the old scripts directory so that the old style rvm- scripts are cleared out.
39
40
  for dir_name in config scripts examples lib hooks ; do
40
41
  mkdir -p "$rvm_path/$dir_name"
@@ -46,47 +47,49 @@ done ; unset dir_name
46
47
  #
47
48
  # Bin Scripts
48
49
  #
49
- cp -Rf "$source_dir/binscripts/" $rvm_path/bin
50
+ echo -e "\n Installing bin scripts to $rvm_path/bin ..."
51
+ # Cleanse and purge...
52
+ rm -f $rvm_path/bin/rvm ; rm -rf $rvm_path/bin/binscripts
53
+ for file in rvm-prompt rvm ; do
54
+ cp -f "$source_dir/binscripts/$file" $rvm_path/bin/
55
+ done
50
56
  chmod +x $rvm_path/bin/*
51
- ln -nfs $rvm_path/scripts/rvm $rvm_path/bin/rvm
52
57
 
53
58
  #
54
59
  # RC Files
55
60
  #
61
+ echo -e "\n Checking rc files ($rvm_rc_files) ..."
56
62
  if [[ "$rvm_loaded_flag" != "1" ]] ; then
57
63
  for rcfile in $(echo $rvm_rc_files) ; do
58
64
  if [[ ! -f $rcfile ]] ; then touch $rcfile ; fi
59
- if [[ -z "$(awk "/scripts\/rvm/" $rcfile)" ]] ; then
65
+
66
+ grep "scripts\/rvm" "$rcfile" > /dev/null 2>&1
67
+ if [[ $? -gt 0 ]] ; then
60
68
  echo " Adding 'if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi' to $rcfile."
61
69
  echo -e "\n# rvm-install added line:\nif [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi\n" >> $rcfile
62
- else
63
- : # it exists... remove it and append at the end
64
70
  fi
65
71
  done
66
72
  fi
67
73
 
68
74
  if [[ "root" = "$(whoami)" ]] ; then
69
- ln -nfs $rvm_path/scripts/rvm /usr/local/bin/rvm
70
- else
71
- ln -nfs $rvm_path/scripts/rvm $rvm_path/bin/rvm
75
+ echo -e "\n Symlinking rvm to $rvm_symlink_path/rvm ..."
76
+ ln -nfs $rvm_path/bin/rvm $rvm_symlink_path/rvm
77
+ chmod +x $rvm_symlink_path/rvm
72
78
  fi
73
- chmod +x $rvm_path/scripts/rvm
74
79
 
75
80
  #
76
81
  # System Checks
77
82
  #
78
83
  $rvm_path/scripts/notes
79
84
 
80
- echo -e " $item In order to use rvm the following line must occur in your shell's loading files, after all path/variable settings.:"
81
- echo -e " $item if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
82
- echo -e " $item CLOSE THIS SHELL AND OPEN A NEW ONE in order to use rvm."
85
+ echo -e " $item In order to use rvm the following line must occur in your shell's loading files, after all path/variable settings:"
86
+ echo -e "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
87
+ echo -e "\n $item CLOSE THIS SHELL AND OPEN A NEW ONE in order to use rvm."
83
88
 
84
89
  echo -e "\n$(tput setaf 2)RTFM:\n $(tput sgr0) http://rvm.beginrescueend.com/ \n"
85
90
  echo -e "$(tput setaf 2)w⦿‿⦿t!$(tput sgr0)"
86
91
  echo -e "\n ~ Wayne\n"
87
92
 
88
- if [[ -x "$rvm_path/scripts/rvm" ]] ; then
89
- "$rvm_path/scripts/rvm" -v
90
- fi
93
+ if [[ -x "$rvm_path/bin/rvm" ]] ; then "$rvm_path/bin/rvm" -v ; fi
91
94
 
92
95
  exit 0
data/scripts/selector CHANGED
@@ -24,12 +24,13 @@ __rvm_select() {
24
24
  elif [[ "nightly" = "$rvm_ruby_version" ]] ; then
25
25
  rvm_url="http://macruby.icoretech.org/latest"
26
26
  rvm_ruby_string="${rvm_ruby_interpreter}-${rvm_ruby_version}"
27
+ rvm_ruby_package_name="${rvm_ruby_interpreter}_nightly-${rvm_ruby_version}"
28
+ rvm_ruby_package_file="$rvm_ruby_package_name"
27
29
  else
28
30
  __rvm_db "macruby_version" "rvm_ruby_version"
29
- rvm_ruby_package_name="${rvm_ruby_interpreter}_nightly-${rvm_ruby_version}"
30
- rvm_ruby_package_file="MacRuby%200.5%20beta%201.zip"
31
+ rvm_ruby_package_name="MacRuby%200.5%20beta%201.zip"
32
+ rvm_ruby_package_file="$rvm_ruby_package_name"
31
33
  rvm_url="http://www.macruby.org/files/MacRuby%200.5%20beta%201.zip"
32
- rvm_ruby_string="${rvm_ruby_interpreter}-${rvm_ruby_version}"
33
34
  fi
34
35
 
35
36
  unset rvm_ruby_patch_level
@@ -57,9 +58,10 @@ __rvm_select() {
57
58
  rvm_url="${rvm_ruby_repo_url:-$(__rvm_db "jruby_repo_url")}"
58
59
  else
59
60
  rvm_ruby_version="${rvm_ruby_version:-"$(__rvm_db "jruby_version")"}"
60
- rvm_package_file="${rvm_ruby_interpreter}-bin-${rvm_ruby_version}"
61
+ rvm_ruby_package_file="${rvm_ruby_interpreter}-bin-${rvm_ruby_version}"
62
+ rvm_ruby_package_name="${rvm_ruby_interpreter}-${rvm_ruby_version}"
61
63
  rvm_ruby_string="${rvm_ruby_interpreter}-${rvm_ruby_version}"
62
- rvm_url="http://jruby.kenai.com/downloads/${rvm_ruby_version}/${rvm_package_file}.tar.gz"
64
+ rvm_url="http://jruby.kenai.com/downloads/${rvm_ruby_version}/${rvm_ruby_package_file}.tar.gz"
63
65
  fi
64
66
  alias jruby_ng="jruby --ng"
65
67
  alias jruby_ng_server="jruby --ng-server"
@@ -81,7 +83,7 @@ __rvm_select() {
81
83
  rvm_ruby_package_name="ree-$rvm_ruby_version-$rvm_ruby_revision"
82
84
  else
83
85
  rvm_ruby_package_file="ruby-enterprise-$rvm_ruby_version-$rvm_ruby_patch_level"
84
- rvm_url="${rvm_url:-$(__rvm_db "${rvm_ruby_interpreter}_${rvm_ruby_version}_url")}/$rvm_ruby_package_file.tar.gz"
86
+ rvm_url="$(__rvm_db "${rvm_ruby_interpreter}_${rvm_ruby_version}_url")/$rvm_ruby_package_file.tar.gz"
85
87
  fi
86
88
  fi
87
89
 
@@ -196,7 +198,7 @@ __rvm_use() {
196
198
 
197
199
  if [[ "root" = "$(whoami)" ]] ; then
198
200
  for binary in erb gem irb rake rdoc ri ruby testrb ; do
199
- rm -f /usr/local/bin/$binary
201
+ rm -f $rvm_symlink_path/$binary
200
202
  done
201
203
  fi
202
204
 
@@ -239,10 +241,10 @@ __rvm_use() {
239
241
 
240
242
  if [[ "root" = "$(whoami)" ]] ; then
241
243
  for binary in erb gem irb rake rdoc ri ruby testrb ; do
242
- rm -f /usr/local/bin/$binary
243
- ln -nfs $rvm_ruby_home/bin/$binary /usr/local/bin/$binary
244
- rm -f /usr/local/bin/passenger_ruby
245
- ln -nfs $rvm_bin_path/$rvm_ruby_string /usr/local/bin/passenger_ruby
244
+ rm -f $rvm_symlink_path/$binary
245
+ ln -nfs $rvm_ruby_home/bin/$binary $rvm_symlink_path/$binary
246
+ rm -f $rvm_symlink_path/passenger_ruby
247
+ ln -nfs $rvm_bin_path/$rvm_ruby_string $rvm_symlink_path/passenger_ruby
246
248
  done
247
249
  fi
248
250
  fi
@@ -297,6 +299,7 @@ __rvm_ruby_string() {
297
299
  # * rvm_ruby_patch_level
298
300
  # * rvm_ruby_revision
299
301
  # * rvm_ruby_tag
302
+ # * rvm_ruby_patch
300
303
 
301
304
  set_name=$(echo "$rvm_ruby_string" | awk -F'%' '{print $2}')
302
305
  if [[ ! -z "$set_name" ]] ; then rvm_gem_set_name="$set_name" ; fi
@@ -346,6 +349,9 @@ __rvm_ruby_string() {
346
349
  rvm_ruby_tag="$string"
347
350
  elif $rvm_scripts_path/match "$string" "^m[0-9]" ; then
348
351
  rvm_ruby_mode="$string"
352
+ elif $rvm_scripts_path/match "$string" "^h[a-z]" ; then
353
+ unset rvm_ruby_patch_level rvm_ruby_revision rvm_ruby_tag
354
+ rvm_ruby_patch="$string"
349
355
  elif $rvm_scripts_path/match "$string" "^[a-z][a-z]" ; then
350
356
  rvm_ruby_interpreter="$string"
351
357
  else
@@ -381,6 +387,11 @@ __rvm_ruby_string() {
381
387
  rvm_ruby_string="${rvm_ruby_string}-${rvm_ruby_revision}"
382
388
  elif [[ ! -z "$rvm_ruby_tag" ]] ; then
383
389
  rvm_ruby_string="${rvm_ruby_string}-${rvm_ruby_tag}"
390
+ elif [[ ! -z "$rvm_ruby_patch" ]] ; then
391
+ if [[ -z "$rvm_ruby_patch_name" ]] ; then
392
+ rvm_ruby_patch_name="$(basename $rvm_ruby_patch | awk -F',' '{print $1}')"
393
+ fi
394
+ rvm_ruby_string="${rvm_ruby_string}-${rvm_ruby_patch}"
384
395
  elif [[ ! -z "$rvm_ruby_patch_level" ]] ; then
385
396
  rvm_ruby_string="${rvm_ruby_string}-${rvm_ruby_patch_level}"
386
397
  else
data/scripts/update CHANGED
@@ -26,7 +26,7 @@ source_dir="${source_dir:-$cwd}"
26
26
 
27
27
  # State what is required to use rvm
28
28
  echo -e "\n$(tput setaf 2)rvm$(tput sgr0) - shell scripts that allows a user to manage multiple ruby versions in their own account."
29
- echo -e "\n Installing to $rvm_path..."
29
+ echo -e "\n Prepairing $rvm_path ..."
30
30
  for dir_name in src scripts bin log archives config gems examples ; do
31
31
  mkdir -p "$rvm_path/$dir_name"
32
32
  done
@@ -35,6 +35,7 @@ cp -f "$source_dir/README" "$rvm_path/"
35
35
  #
36
36
  # Scripts
37
37
  #
38
+ echo -e "\n Installing rvm to $rvm_path/ ..."
38
39
  rm -rf $rvm_path/scripts # Clear the old scripts directory so that the old style rvm- scripts are cleared out.
39
40
  for dir_name in config scripts examples lib hooks ; do
40
41
  mkdir -p "$rvm_path/$dir_name"
@@ -46,47 +47,49 @@ done ; unset dir_name
46
47
  #
47
48
  # Bin Scripts
48
49
  #
49
- cp -Rf "$source_dir/binscripts/" $rvm_path/bin
50
+ echo -e "\n Installing bin scripts to $rvm_path/bin ..."
51
+ # Cleanse and purge...
52
+ rm -f $rvm_path/bin/rvm ; rm -rf $rvm_path/bin/binscripts
53
+ for file in rvm-prompt rvm ; do
54
+ cp -f "$source_dir/binscripts/$file" $rvm_path/bin/
55
+ done
50
56
  chmod +x $rvm_path/bin/*
51
- ln -nfs $rvm_path/scripts/rvm $rvm_path/bin/rvm
52
57
 
53
58
  #
54
59
  # RC Files
55
60
  #
61
+ echo -e "\n Checking rc files ($rvm_rc_files) ..."
56
62
  if [[ "$rvm_loaded_flag" != "1" ]] ; then
57
63
  for rcfile in $(echo $rvm_rc_files) ; do
58
64
  if [[ ! -f $rcfile ]] ; then touch $rcfile ; fi
59
- if [[ -z "$(awk "/scripts\/rvm/" $rcfile)" ]] ; then
65
+
66
+ grep "scripts\/rvm" "$rcfile" > /dev/null 2>&1
67
+ if [[ $? -gt 0 ]] ; then
60
68
  echo " Adding 'if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi' to $rcfile."
61
69
  echo -e "\n# rvm-install added line:\nif [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi\n" >> $rcfile
62
- else
63
- : # it exists... remove it and append at the end
64
70
  fi
65
71
  done
66
72
  fi
67
73
 
68
74
  if [[ "root" = "$(whoami)" ]] ; then
69
- ln -nfs $rvm_path/scripts/rvm /usr/local/bin/rvm
70
- else
71
- ln -nfs $rvm_path/scripts/rvm $rvm_path/bin/rvm
75
+ echo -e "\n Symlinking rvm to $rvm_symlink_path/rvm ..."
76
+ ln -nfs $rvm_path/bin/rvm $rvm_symlink_path/rvm
77
+ chmod +x $rvm_symlink_path/rvm
72
78
  fi
73
- chmod +x $rvm_path/scripts/rvm
74
79
 
75
80
  #
76
81
  # System Checks
77
82
  #
78
83
  $rvm_path/scripts/notes
79
84
 
80
- echo -e " $item In order to use rvm the following line must occur in your shell's loading files, after all path/variable settings.:"
81
- echo -e " $item if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
82
- echo -e " $item CLOSE THIS SHELL AND OPEN A NEW ONE in order to use rvm."
85
+ echo -e " $item In order to use rvm the following line must occur in your shell's loading files, after all path/variable settings:"
86
+ echo -e "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
87
+ echo -e "\n $item CLOSE THIS SHELL AND OPEN A NEW ONE in order to use rvm."
83
88
 
84
89
  echo -e "\n$(tput setaf 2)RTFM:\n $(tput sgr0) http://rvm.beginrescueend.com/ \n"
85
90
  echo -e "$(tput setaf 2)w⦿‿⦿t!$(tput sgr0)"
86
91
  echo -e "\n ~ Wayne\n"
87
92
 
88
- if [[ -x "$rvm_path/scripts/rvm" ]] ; then
89
- "$rvm_path/scripts/rvm" -v
90
- fi
93
+ if [[ -x "$rvm_path/bin/rvm" ]] ; then "$rvm_path/bin/rvm" -v ; fi
91
94
 
92
95
  exit 0
data/scripts/utility CHANGED
@@ -17,6 +17,7 @@ __rvm_db() {
17
17
  eval "$variable=$value"
18
18
  fi
19
19
  fi
20
+ unset key value variable
20
21
  }
21
22
 
22
23
  __rvm_info() {
@@ -65,7 +66,7 @@ __rvm_debug() {
65
66
  $rvm_scripts_path/log "debug" "ARCHFLAGS: $ARCHFLAGS"
66
67
  $rvm_scripts_path/log "debug" "LDFLAGS: $LDFLAGS"
67
68
  $rvm_scripts_path/log "debug" "CFLAGS: $CFLAGS"
68
- $rvm_scripts_path/log "debug" "/Developer/SDKs/*:$(basename -a /Developer/SDKs/* | tr "\n" ',')"
69
+ $rvm_scripts_path/log "debug" "/Developer/SDKs/*:$(/usr/bin/basename -a /Developer/SDKs/* | tr "\n" ',')"
69
70
  fi
70
71
 
71
72
  for file_name in $(echo $rc_files) ; do
@@ -130,11 +131,11 @@ __rvm_run() {
130
131
 
131
132
  __rvm_cleanup_variables() {
132
133
  __rvm_unset_ruby_variables
133
- unset rvm_ruby_selected_flag rvm_action rvm_irbrc_file rvm_command rvm_error_message rvm_gem_set_name rvm_url rvm_force_flag rvm_all_flag rvm_reconfigure_flag rvm_make_flags rvm_bin_flag rvm_load_flag rvm_dump_flag rvm_self_flag rvm_gem_flag rvm_rubygems_flag rvm_debug_flag rvm_delete_flag rvm_summary_flag rvm_test_flag _rvm_spec_flag rvm_json_flag rvm_yaml_flag rvm_shebang_flag rvm_env_flag rvm_tail_flag rvm_use_flag rvm_dir_flag rvm_list_flag rvm_empty_flag rvm_file_name rvm_benchmark_flag rvm_clear_flag rvm_name_flag rvm_verbose_flag rvm_user_flag rvm_system_flag rvm_ruby_configure_flags
134
+ unset rvm_action rvm_irbrc_file rvm_command rvm_error_message rvm_gem_set_name rvm_url rvm_force_flag rvm_all_flag rvm_reconfigure_flag rvm_make_flags rvm_bin_flag rvm_load_flag rvm_dump_flag rvm_self_flag rvm_gem_flag rvm_rubygems_flag rvm_debug_flag rvm_delete_flag rvm_summary_flag rvm_test_flag _rvm_spec_flag rvm_json_flag rvm_yaml_flag rvm_shebang_flag rvm_env_flag rvm_tail_flag rvm_use_flag rvm_dir_flag rvm_list_flag rvm_empty_flag rvm_file_name rvm_benchmark_flag rvm_clear_flag rvm_name_flag rvm_verbose_flag rvm_user_flag rvm_system_flag rvm_ruby_configure_flags
134
135
  }
135
136
 
136
137
  __rvm_unset_ruby_variables() {
137
- unset rvm_ruby_interpreter rvm_ruby_version rvm_ruby_repo_url rvm_ruby_package_name rvm_ruby_patch_level rvm_ruby_make rvm_ruby_make_install rvm_ruby_revision rvm_ruby_tag rvm_major_version rvm_minor_version rvm_ruby_gem_home rvm_ruby_binary rvm_ruby_home rvm_ruby_log_path rvm_ruby_src_path rvm_ruby_irbrc rvm_ruby_selected_flag rvm_ruby_string rvm_ruby_string rvm_ruby_src_path rvm_ruby_repo_url rvm_major_version rvm_minor_version rvm_ruby_gem_home rvm_head_flag rvm_ruby_configure rvm_ruby_mode
138
+ unset rvm_ruby_interpreter rvm_ruby_version rvm_url rvm_ruby_repo_url rvm_ruby_package_name rvm_ruby_patch_level rvm_ruby_make rvm_ruby_make_install rvm_ruby_revision rvm_ruby_tag rvm_major_version rvm_minor_version rvm_ruby_gem_home rvm_ruby_binary rvm_ruby_home rvm_ruby_log_path rvm_ruby_src_path rvm_ruby_irbrc rvm_ruby_selected_flag rvm_ruby_string rvm_ruby_string rvm_ruby_src_path rvm_ruby_repo_url rvm_major_version rvm_minor_version rvm_ruby_gem_home rvm_head_flag rvm_ruby_configure rvm_ruby_mode rvm_ruby_patch rvm_ruby_package_file rvm_ruby_package_name
138
139
  }
139
140
 
140
141
  __rvm_load_rvmrc() {
@@ -143,12 +144,13 @@ __rvm_load_rvmrc() {
143
144
  }
144
145
 
145
146
  __rvm_bin_scripts() {
146
- for rvm_ruby_binary in $(\ls $rvm_path/*/bin/ruby 2> /dev/null) ; do
147
- if [[ -x "$rvm_ruby_binary" ]] ; then
148
- rvm_ruby_string=$(dirname "$rvm_ruby_binary" | xargs dirname | xargs basename)
149
- __rvm_select
150
- __rvm_bin_script
151
- fi
147
+ # for rvm_ruby_binary in $(\ls $rvm_path/*/bin/ruby 2> /dev/null) ; do
148
+ for rvm_ruby_binary in $rvm_path/*/bin/ruby ; do
149
+ if [[ -x "$rvm_ruby_binary" ]] ; then
150
+ rvm_ruby_string=$(dirname "$rvm_ruby_binary" | xargs dirname | xargs basename)
151
+ __rvm_select
152
+ __rvm_bin_script
153
+ fi
152
154
  done
153
155
  }
154
156
 
@@ -678,7 +680,7 @@ __rvm_make_flags() {
678
680
  if [[ ! -z "$rvm_archflags" ]] ; then
679
681
  ARCHFLAGS="$rvm_archflags" ; export ARCHFLAGS
680
682
  # Use the latest sdk available.
681
- if [[ -z "$rvm_sdk" ]] ; then rvm_sdk="$(basename -a /Developer/SDKs/* | awk '/^M/' | sort | tail -n 1)" ; fi
683
+ if [[ -z "$rvm_sdk" ]] ; then rvm_sdk="$(/usr/bin/basename -a /Developer/SDKs/* | awk '/^M/' | sort | tail -n 1)" ; fi
682
684
  CFLAGS="${CFLAGS:-"-isysroot /Developer/SDKs/$rvm_sdk $rvm_archflags"}" ; export CFLAGS
683
685
  LDFLAGS="${LDFLAGS:-"-Wl,-syslibroot /Developer/SDKs/$rvm_sdk $rvm_archflags"}" ; export LDFLAGS
684
686
  # CXXFLAGS="-mmacosx-version-min="$(sw_vers -productVersion | awk -F'.' '{print $1"."$2}')" -isysroot /Developer/SDKs/$rvm_sdk " ; export CXXFLAGS
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.86
4
+ version: 0.0.87
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-11-30 00:00:00 -05:00
12
+ date: 2009-12-02 00:00:00 -05:00
13
13
  default_executable: rvm-install
14
14
  dependencies: []
15
15
 
@@ -24,6 +24,7 @@ extra_rdoc_files:
24
24
  files:
25
25
  - LICENCE
26
26
  - README
27
+ - binscripts/rvm
27
28
  - binscripts/rvm-prompt
28
29
  - config/db
29
30
  - config/md5
@@ -38,6 +39,7 @@ files:
38
39
  - rvm.gemspec
39
40
  - scripts/aliases
40
41
  - scripts/array
42
+ - scripts/cd
41
43
  - scripts/cli
42
44
  - scripts/color
43
45
  - scripts/completion