rvm 0.1.33 → 0.1.34

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,44 @@
1
+ (ruby-)1.8.6(-p399)
2
+ (ruby-)1.8.6-head
3
+ (ruby-)1.8.7(-p249)
4
+ (ruby-)1.8.7-head
5
+ (ruby-)1.9.1(-p243)
6
+ (ruby-)1.9.1(-p376)
7
+ (ruby-)1.9.1-head
8
+ (ruby-)1.9.2-preview1
9
+ (ruby-)1.9.2-head
10
+ ruby-head
11
+
12
+ # Jruby
13
+ jruby-1.2.0
14
+ jruby-1.3.1
15
+ jruby-1.4.0
16
+ jruby(-1.5.0) # the default
17
+ jruby-head
18
+
19
+ # Rubinius
20
+ rbx(-1.0.0) # default
21
+ rbx-head
22
+
23
+ # Ruby Enterprise Edition
24
+ ree-1.8.6
25
+ ree(-1.8.7) # the default
26
+ ree-1.8.6-head
27
+ ree-1.8.7-head
28
+
29
+ # MagLev
30
+ maglev(-23530)
31
+ maglev-head
32
+
33
+ # Shyouhei head, the default mput
34
+ mput(-head)
35
+
36
+ # Mac OS X Snow Leopard Only
37
+ macruby(-nightly) # the default macruby
38
+ macruby-head # Build from the macruby git repository
39
+
40
+ # Not working yet
41
+ ironruby-0.9.3
42
+ ironruby-1.0-rc2
43
+ ironruby-head
44
+
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env bash
2
+
3
+ echo "Snapshotting the current environment gem list into snapshot.gems"
4
+ file_name="snapshot.gems"
5
+ echo '# system snapshot gemset file' > snapshot.gems
6
+ for gem in $(gem list | sed 's#[\(|\)]##g' | sed 's#, #,#g' | tr ' ' ';') ; do
7
+ name="$(echo $gem | awk -F';' '{print $1}')"
8
+ versions="$(echo $gem | awk -F';' '{print $2}' | sed 's#,# #g')"
9
+ for version in $versions ; do
10
+ echo "$name -v$version" >> $file_name
11
+ done ; unset version versions
12
+ done ; unset file_name
13
+
14
+ exit $?
data/install CHANGED
@@ -265,7 +265,7 @@ else
265
265
  if [[ "root" != "$(whoami)" ]] ; then
266
266
  printf "\n$(tput setaf 1)You must now finish the install manually:$(tput sgr0)"
267
267
  printf "\n1) Place the folowing line at the end of your shell's loading files(.bashrc or .bash_profile for bash and .zshrc for zsh), after all path/variable settings:"
268
- printf "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
268
+ printf "\n [[ -s \$HOME/scripts/rvm ]] && source \$HOME/scripts/rvm"
269
269
  printf "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
270
270
  printf "\n This means that if you see '[ -z "$PS1" ] && return' then you must change this line to:"
271
271
  printf "\n if [[ ! -z "$PS1" ]] ; then"
@@ -273,8 +273,8 @@ else
273
273
  printf "\n fi # <= be sure to close the if."
274
274
  printf "\n #EOF .bashrc"
275
275
  printf "\n Be absolutely *sure* to REMOVE the '&& return'."
276
- printf "\n If you wish to DRY up your config you can 'source ~/.bashrc' at the top of your .bash_profile."
277
- printf "\n placing all non-interactive items in the .bashrc"
276
+ printf "\n If you wish to DRY up your config you can 'source ~/.bashrc' at the bottom of your .bash_profile."
277
+ printf "\n placing all non-interactive items in the .bashrc, including the 'source' line above"
278
278
  printf "\n3) Then $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
279
279
  fi
280
280
  if [[ -s $HOME/.bashrc ]] && grep '&& return' $HOME/.bashrc ; then
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 1
4
- :patch: 33
4
+ :patch: 34
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rvm}
8
- s.version = "0.1.33"
8
+ s.version = "0.1.34"
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{2010-05-27}
12
+ s.date = %q{2010-05-29}
13
13
  s.default_executable = %q{rvm-install}
14
14
  s.description = %q{Manages Ruby interpreter environments and switching between them.}
15
15
  s.email = %q{wayneeseguin@gmail.com}
@@ -26,7 +26,9 @@ Gem::Specification.new do |s|
26
26
  "binscripts/rvm-update-latest",
27
27
  "binscripts/rvmsudo",
28
28
  "config/db",
29
+ "config/known",
29
30
  "config/md5",
31
+ "contrib/gemset_snapshot",
30
32
  "examples/rvmrc",
31
33
  "gemsets/default.gems",
32
34
  "gemsets/global.gems",
@@ -105,7 +105,6 @@ __rvm_parse_args() {
105
105
  list|info|alias|docs)
106
106
  rvm_action="$rvm_token"
107
107
  rvm_ruby_args="$@"
108
- if [[ "$rvm_token" = "info" ]] && [[ -z "$rvm_ruby_args" ]] ; then rvm_ruby_args="$rvm_ruby_string" ; fi
109
108
  rvm_parse_break=1
110
109
  ;;
111
110
 
@@ -394,6 +393,8 @@ __rvm_parse_args() {
394
393
  }
395
394
 
396
395
  rvm() {
396
+ __rvm_setup
397
+
397
398
  if [[ ! -z "$PS1" ]] ; then export rvm_interactive=1 ; else unset rvm_interactive ; fi
398
399
 
399
400
  if [[ -z "$ZSH_VERSION" ]] ; then
@@ -433,8 +434,9 @@ rvm() {
433
434
  # TODO: Make debug run in the current environment.
434
435
  debug) $rvm_scripts_path/info '' debug ; result=$? ;;
435
436
  info)
437
+ if [[ "$1" == "info" ]]; then shift; fi
436
438
  if [[ -z "$rvm_ruby_args" ]] ; then
437
- . $rvm_scripts_path/info
439
+ $rvm_scripts_path/info
438
440
  else
439
441
  $rvm_scripts_path/info $rvm_ruby_args
440
442
  fi
@@ -464,8 +466,11 @@ rvm() {
464
466
  ;;
465
467
 
466
468
  ruby|gem|rake)
469
+ old_rvm_ruby_string=$rvm_ruby_string
467
470
  unset rvm_ruby_string
468
471
  $rvm_scripts_path/set $rvm_action $rvm_ruby_args
472
+ [[ -n "$old_rvm_ruby_string" ]] && rvm_ruby_string=$old_rvm_ruby_string
473
+ unset old_rvm_ruby_string
469
474
  result=$?
470
475
  ;;
471
476
 
@@ -537,6 +542,8 @@ rvm() {
537
542
 
538
543
  if [[ ! -z "$rvm_trace_flag" ]] ; then set +x ; unset rvm_trace_flag ; fi
539
544
 
545
+ __rvm_teardown
546
+
540
547
  return $result
541
548
  }
542
549
 
@@ -38,11 +38,10 @@ generate_docs() {
38
38
  $rvm_scripts_path/log "info" "( Errors will be logged to $rvm_log_path/$rvm_ruby_string/docs.error.log )"
39
39
  if gem list | grep ^hanna >/dev/null 2>&1 ; then
40
40
  hanna -o $rvm_docs_path/$rvm_ruby_string/$rvm_docs_type --inline-source --line-numbers --fmt=html 2>> $rvm_log_path/$rvm_ruby_string/docs.error.log
41
- hanna --ri --ri-site -o $rvm_docs_path/$rvm_ruby_string/$rvm_docs_type --inline-source --line-numbers --fmt=html 2>> $rvm_log_path/$rvm_ruby_string/docs.error.log
42
41
  else
43
42
  rdoc -a -o $rvm_docs_path/$rvm_ruby_string/$rvm_docs_type 2>> $rvm_log_path/$rvm_ruby_string/docs.error.log
44
- rdoc -a --ri --ri-site -o $rvm_docs_path/$rvm_ruby_string/$rvm_docs_type 2>> $rvm_log_path/$rvm_ruby_string/docs.error.log
45
43
  fi
44
+ rdoc -a --ri-site 2>> $rvm_log_path/$rvm_ruby_string/docs.error.log
46
45
  }
47
46
 
48
47
  if [[ "open" = "$action" ]] ; then
@@ -23,7 +23,6 @@ __rvm_gemset_create() {
23
23
  for gemset in $(echo $gems_args) ; do
24
24
  gem_home="${rvm_ruby_gem_prefix}${rvm_gemset_separator}${gems_args/ /}"
25
25
  mkdir -p $gem_home
26
- ln -nfs "$HOME/.gem/cache" "$gem_home/cache"
27
26
  $rvm_scripts_path/log "info" "Gemset '$gemset' created."
28
27
  done ; unset gem_home
29
28
  }
@@ -55,7 +54,8 @@ __rvm_gemset_delete() {
55
54
  echo -n "(anything other than 'yes' will cancel) > "
56
55
  read response
57
56
  if [[ "yes" = "$response" ]] ; then
58
- rm -f $gemdir/cache && rm -rf $gemdir
57
+ rm -f $gemdir/cache 2>/dev/null
58
+ rm -rf $gemdir
59
59
  else
60
60
  $rvm_scripts_path/log "info" "Not doing anything, phew... close call that one eh?"
61
61
  fi
@@ -237,10 +237,10 @@ __rvm_gem_install() {
237
237
  else
238
238
  if [[ -s "$gem" ]] ; then
239
239
  cache_file="$gem"
240
- elif [[ -s "$rvm_gems_path/cache/${gem_file_name}" ]] ; then
241
- cache_file="$rvm_gems_path/cache/${gem_file_name}"
240
+ elif [[ -s "$rvm_ruby_gem_home/cache/${gem_file_name}" ]] ; then
241
+ cache_file="$rvm_ruby_gem_home/cache/${gem_file_name}"
242
242
  else
243
- cache_file="${cache_file:-$(\ls ${rvm_gems_path}/cache/${gem_file_name} 2> /dev/null | sort | head -n1)}"
243
+ cache_file="${cache_file:-$(\ls ${rvm_ruby_gem_home}/cache/${gem_file_name} 2> /dev/null | sort | head -n1)}"
244
244
  fi
245
245
 
246
246
  if [[ ! -s "$cache_file" ]] ; then
@@ -259,9 +259,9 @@ __rvm_gem_install() {
259
259
  unset gem # already installed, not forcing reinstall.
260
260
  $rvm_scripts_path/log "info" "$gem_name $gem_version exists, skipping (--force to re-install)"
261
261
  else
262
- if [[ -s "$rvm_gems_path/cache/$(basename $gem_file_name)" ]] ; then
262
+ if [[ -s "$rvm_ruby_gem_home/cache/$(basename $gem_file_name)" ]] ; then
263
263
  mkdir -p "$rvm_tmp_path/$$/"
264
- mv "$rvm_gems_path/cache/$gem_file_name" "$rvm_tmp_path/$$/$gem_file_name"
264
+ mv "$rvm_ruby_gem_home/cache/$gem_file_name" "$rvm_tmp_path/$$/$gem_file_name"
265
265
  gem="$rvm_tmp_path/$$/$gem_file_name -f -l"
266
266
  else
267
267
  gem="$cache_file"
@@ -67,7 +67,7 @@ info_environment() {
67
67
  rvm_info="$rvm_info\n MY_RUBY_HOME: \"$MY_RUBY_HOME\""
68
68
  rvm_info="$rvm_info\n IRBRC: \"$IRBRC\""
69
69
  rvm_info="$rvm_info\n RUBYOPT: \"$RUBYOPT\""
70
- rvm_info="$rvm_info\n gemset: \"$(printf $GEM_HOME | awk -F${rvm_gemset_separator:-'@'} '{print $2}')\"\n"
70
+ rvm_info="$rvm_info\n gemset: \"$(printf "$GEM_HOME" | awk -F${rvm_gemset_separator:-'@'} '{print $2}')\"\n"
71
71
  if [[ ! -z "$MAGLEV_HOME" ]] ; then
72
72
  rvm_info="$rvm_info\n MAGLEV_HOME: \"$MAGLEV_HOME\""
73
73
  fi
@@ -131,12 +131,12 @@ fi
131
131
  if [[ -z "$sections" ]] ; then sections="$all_sections" ; fi
132
132
 
133
133
  if [[ -z "$ruby_strings" ]] ; then
134
- printf "${rvm_ruby_string}:\n"
134
+ printf "$(echo "$GEM_HOME" | xargs basename):\n"
135
135
  info_sections
136
136
  else
137
137
  for ruby_string in $(printf $ruby_strings | tr ',' ' ') ; do
138
138
  rvm_ruby_string="${ruby_string}" ; __rvm_select ; __rvm_use
139
- printf "${rvm_ruby_string}:\n"
139
+ printf "$(__rvm_environment_identifier):\n"
140
140
  info_sections
141
141
  done
142
142
  fi
@@ -265,7 +265,7 @@ else
265
265
  if [[ "root" != "$(whoami)" ]] ; then
266
266
  printf "\n$(tput setaf 1)You must now finish the install manually:$(tput sgr0)"
267
267
  printf "\n1) Place the folowing line at the end of your shell's loading files(.bashrc or .bash_profile for bash and .zshrc for zsh), after all path/variable settings:"
268
- printf "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
268
+ printf "\n [[ -s \$HOME/scripts/rvm ]] && source \$HOME/scripts/rvm"
269
269
  printf "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
270
270
  printf "\n This means that if you see '[ -z "$PS1" ] && return' then you must change this line to:"
271
271
  printf "\n if [[ ! -z "$PS1" ]] ; then"
@@ -273,8 +273,8 @@ else
273
273
  printf "\n fi # <= be sure to close the if."
274
274
  printf "\n #EOF .bashrc"
275
275
  printf "\n Be absolutely *sure* to REMOVE the '&& return'."
276
- printf "\n If you wish to DRY up your config you can 'source ~/.bashrc' at the top of your .bash_profile."
277
- printf "\n placing all non-interactive items in the .bashrc"
276
+ printf "\n If you wish to DRY up your config you can 'source ~/.bashrc' at the bottom of your .bash_profile."
277
+ printf "\n placing all non-interactive items in the .bashrc, including the 'source' line above"
278
278
  printf "\n3) Then $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
279
279
  fi
280
280
  if [[ -s $HOME/.bashrc ]] && grep '&& return' $HOME/.bashrc ; then
@@ -4,11 +4,11 @@ if [[ "$rvm_trace_flag" -eq 2 ]] ; then set -x ; export rvm_trace_flag ; fi
4
4
 
5
5
  # Query for valid rvm ruby strings
6
6
  # This is meant to be used with scripting.
7
- __rvm_list_strings() {
7
+ list_strings() {
8
8
  echo $(\ls $rvm_rubies_path)
9
9
  }
10
10
 
11
- __rvm_list_default() {
11
+ list_default() {
12
12
  strings="$(echo $rvm_ruby_args | awk '{print $2}')"
13
13
  if [[ "$strings" = "string" ]] ; then
14
14
  $rvm_scripts_path/alias show default 2>/dev/null | awk -F"$rvm_gemset_separator" '{print $1}' | xargs basename
@@ -24,26 +24,24 @@ __rvm_list_default() {
24
24
  fi
25
25
  }
26
26
 
27
- __rvm_list_known() {
27
+ list_ruby_svn_tags() {
28
28
  while read -r tag
29
29
  do
30
30
  prefix="$(echo ${tag/\//} | sed 's#^v1_##' | awk -F'_' '{print "(ruby-)1."$1"."$2}' | sed 's#p$##')"
31
31
  echo "${prefix}-t${tag/\//}"
32
32
  unset prefix tag
33
33
  done < <(svn list http://svn.ruby-lang.org/repos/ruby/tags/ | awk '/^v1_[8|9]/')
34
- printf "\n(ruby-)1.8.6(-p399)\n(ruby-)1.8.6-head\n(ruby-)1.8.7(-p249)\n(ruby-)1.8.7-head\n(ruby-)1.9.1(-p243)\n(ruby-)1.9.1(-p376)\n(ruby-)1.9.1-head\n(ruby-)1.9.2-preview1\n(ruby-)1.9.2-head\nruby-head\n"
35
- printf "\njruby-1.2.0\njruby-1.3.1\njruby-1.4.0\njruby(-1.5.0) # the default\njruby-head"
36
- printf "\nrbx(-1.0.0) # default\nrbx-head"
37
- printf "\nree-1.8.6\nree(-1.8.7) # the default\nree-1.8.6-head\nree-1.8.7-head"
38
- printf "\nmaglev(-23530)\nmaglev-head"
39
- printf "\nmput(-head) # shyouhei head, the default mput"
40
- printf "\nironruby-0.9.3\nironruby-1.0-rc2\nironruby-head"
41
- if [[ "Darwin" = "$(uname)" ]] ; then
42
- printf "\nmacruby(-nightly) # the default macruby\nmacruby-head # Build from the macruby git repository"
34
+ }
35
+
36
+ list_known() {
37
+ if [[ -z "$rvm_interactive" ]] || [[ -z "$TERM" ]] || [[ "unknown" = "$TERM" ]] ; then
38
+ cat "$rvm_config_path/known"
39
+ else
40
+ cat "$rvm_config_path/known" | ${PAGER:-less}
43
41
  fi
44
42
  }
45
43
 
46
- __rvm_list_rubies() {
44
+ list_rubies() {
47
45
  echo
48
46
  ruby=$(command -v ruby) ; current_ruby=""
49
47
  if [[ ! -z "$ruby" ]] && [[ ! -z "$(echo $ruby | awk '/rvm/')" ]] ; then
@@ -88,13 +86,15 @@ __rvm_list_rubies() {
88
86
  action="$(echo "$1" | awk '{print $1}')"
89
87
 
90
88
  if [[ "known" = "$action" ]] ; then
91
- __rvm_list_known
89
+ list_known
92
90
  elif [[ "default" = "$action" ]] ; then
93
- __rvm_list_default
91
+ list_default
94
92
  elif [[ -z "$action" ]] || [[ "rubies" = "$action" ]] ; then
95
- __rvm_list_rubies
93
+ list_rubies
96
94
  elif [[ "strings" = "$action" ]] ; then
97
- __rvm_list_strings
95
+ list_strings
96
+ elif [[ "ruby_svn_tags" = "$action" ]] ; then
97
+ list_ruby_svn_tags
98
98
  else # help
99
99
  printf "\nUsage: rvm list {known,default,rubies,strings}"
100
100
  fi
@@ -8,20 +8,20 @@ message=$1
8
8
 
9
9
  if [[ -z "$rvm_interactive" ]] || [[ -z "$TERM" ]] || [[ "unknown" = "$TERM" ]] ; then
10
10
  case "$level" in
11
- debug) shift ; printf "\n<d>$message </d>\n" ;;
12
- info) shift ; printf "\n<i>$message </i>\n" ;;
13
- warn) shift ; printf "\n<w>$message </w>\n" ;;
14
- error) shift ; printf "\n<e>$message </e>\n" >&2 ;;
15
- fail) shift ; printf "\n<f>$message </f>\n" >&2 ;;
11
+ debug) shift ; printf "\n$level: $message" ;;
12
+ info) shift ; printf "\n$level: $message" ;;
13
+ warn) shift ; printf "\n$level: $message" ;;
14
+ error) shift ; printf "\n$level: $message" >&2 ;;
15
+ fail) shift ; printf "\n$level: $message" >&2 ;;
16
16
  *) printf "$message"
17
17
  esac
18
18
  else
19
19
  case "$level" in
20
- debug) shift ; printf "\n$(tput setaf 5)$message$(tput sgr0)\n" ;;
21
- info) shift ; printf "\n$(tput setaf 2)$message$(tput sgr0)\n" ;;
22
- warn) shift ; printf "\n$(tput setaf 3)$message$(tput sgr0)\n" ;;
23
- error) shift ; printf "\n$(tput setaf 1)$message$(tput sgr0)\n" >&2 ;;
24
- fail) shift ; printf "\n$(tput setaf 1)$message$(tput sgr0)\n" >&2 ;;
20
+ debug) shift ; printf "\n$(tput setaf 5)$message$(tput sgr0)" ;;
21
+ info) shift ; printf "\n$(tput setaf 2)$message$(tput sgr0)" ;;
22
+ warn) shift ; printf "\n$(tput setaf 3)$message$(tput sgr0)" ;;
23
+ error) shift ; printf "\n$(tput setaf 1)$message$(tput sgr0)" >&2 ;;
24
+ fail) shift ; printf "\n$(tput setaf 1)$message$(tput sgr0)" >&2 ;;
25
25
  *) printf "$message"
26
26
  esac
27
27
  fi
@@ -267,7 +267,7 @@ RubyWrapper
267
267
  PATH=$rvm_bin_path:$PATH ; export PATH
268
268
 
269
269
  if [[ ! -z "$(echo $rvm_ruby_version | awk '/^1\.0/')" ]] && [[ -z "$rvm_head_flag" ]] ; then
270
- $rvm_scripts_path/log "info" "Downloading $rvm_ruby_file, this may take a while depending on your connection..."
270
+ $rvm_scripts_path/log "info" "Downloading $rvm_ruby_package_file, this may take a while depending on your connection..."
271
271
  $rvm_scripts_path/fetch "$rvm_url"
272
272
  result=$? ; if [[ "$result" -gt 0 ]] ; then
273
273
  $rvm_scripts_path/log "error" "There has been an error while trying to fetch the source. Aborting the installation." ; __rvm_pushpop ; return $result
@@ -7,8 +7,6 @@
7
7
  if [[ "$rvm_loaded_flag" != "1" ]] || [[ "$rvm_reload_flag" = "1" ]] ; then
8
8
  unset rvm_reload_flag
9
9
 
10
- mkdir -p $HOME/.gem/cache
11
-
12
10
  for rvmrc in /etc/rvmrc $HOME/.rvmrc ; do
13
11
  if [[ -f "$rvmrc" ]] ; then
14
12
  if grep -q '^\s*rvm .*$' $rvmrc ; then
@@ -72,7 +70,7 @@ if [[ "$rvm_loaded_flag" != "1" ]] || [[ "$rvm_reload_flag" = "1" ]] ; then
72
70
 
73
71
  alias rvm-restart="source '${rvm_path}/scripts/rvm'"
74
72
 
75
- if command -v ruby >/dev/null 2>&1 && command -v ruby | grep -v rvm >/dev/null ; then
73
+ if ! command -v ruby >/dev/null 2>&1 || command -v ruby | grep -v rvm >/dev/null ; then
76
74
  [[ -s "$rvm_environments_path/default" ]] && source "$rvm_environments_path/default"
77
75
  fi
78
76
  else
@@ -265,7 +265,7 @@ else
265
265
  if [[ "root" != "$(whoami)" ]] ; then
266
266
  printf "\n$(tput setaf 1)You must now finish the install manually:$(tput sgr0)"
267
267
  printf "\n1) Place the folowing line at the end of your shell's loading files(.bashrc or .bash_profile for bash and .zshrc for zsh), after all path/variable settings:"
268
- printf "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
268
+ printf "\n [[ -s \$HOME/scripts/rvm ]] && source \$HOME/scripts/rvm"
269
269
  printf "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
270
270
  printf "\n This means that if you see '[ -z "$PS1" ] && return' then you must change this line to:"
271
271
  printf "\n if [[ ! -z "$PS1" ]] ; then"
@@ -273,8 +273,8 @@ else
273
273
  printf "\n fi # <= be sure to close the if."
274
274
  printf "\n #EOF .bashrc"
275
275
  printf "\n Be absolutely *sure* to REMOVE the '&& return'."
276
- printf "\n If you wish to DRY up your config you can 'source ~/.bashrc' at the top of your .bash_profile."
277
- printf "\n placing all non-interactive items in the .bashrc"
276
+ printf "\n If you wish to DRY up your config you can 'source ~/.bashrc' at the bottom of your .bash_profile."
277
+ printf "\n placing all non-interactive items in the .bashrc, including the 'source' line above"
278
278
  printf "\n3) Then $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
279
279
  fi
280
280
  if [[ -s $HOME/.bashrc ]] && grep '&& return' $HOME/.bashrc ; then
@@ -265,7 +265,7 @@ else
265
265
  if [[ "root" != "$(whoami)" ]] ; then
266
266
  printf "\n$(tput setaf 1)You must now finish the install manually:$(tput sgr0)"
267
267
  printf "\n1) Place the folowing line at the end of your shell's loading files(.bashrc or .bash_profile for bash and .zshrc for zsh), after all path/variable settings:"
268
- printf "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
268
+ printf "\n [[ -s \$HOME/scripts/rvm ]] && source \$HOME/scripts/rvm"
269
269
  printf "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
270
270
  printf "\n This means that if you see '[ -z "$PS1" ] && return' then you must change this line to:"
271
271
  printf "\n if [[ ! -z "$PS1" ]] ; then"
@@ -273,8 +273,8 @@ else
273
273
  printf "\n fi # <= be sure to close the if."
274
274
  printf "\n #EOF .bashrc"
275
275
  printf "\n Be absolutely *sure* to REMOVE the '&& return'."
276
- printf "\n If you wish to DRY up your config you can 'source ~/.bashrc' at the top of your .bash_profile."
277
- printf "\n placing all non-interactive items in the .bashrc"
276
+ printf "\n If you wish to DRY up your config you can 'source ~/.bashrc' at the bottom of your .bash_profile."
277
+ printf "\n placing all non-interactive items in the .bashrc, including the 'source' line above"
278
278
  printf "\n3) Then $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
279
279
  fi
280
280
  if [[ -s $HOME/.bashrc ]] && grep '&& return' $HOME/.bashrc ; then
@@ -1,7 +1,27 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
- # ZSH has 1 based array indexing, bash has 0 based.
4
- if [[ ! -z "$ZSH_VERSION" ]] ; then __shell_array_start=1 ; else __shell_array_start=0 ; fi
3
+ __rvm_setup() {
4
+ # ZSH has 1 based array indexing, bash has 0 based.
5
+ if [[ ! -z "$ZSH_VERSION" ]] ; then
6
+ __shell_array_start=1
7
+ # Set clobber for zsh users, for compatibility with bash's append operator ( >> file ) behavior
8
+ setopt | grep -qs '^noclobber$'
9
+ rvm_zsh_clobber=$?
10
+ setopt clobber
11
+ else
12
+ __shell_array_start=0
13
+ fi ; export __shell_array_start
14
+ }
15
+
16
+ __rvm_teardown() {
17
+ if [[ ! -z "$ZSH_VERSION" ]] ; then
18
+ if [[ "$rvm_zsh_clobber" -eq 0 ]] ; then
19
+ setopt noclobber
20
+ fi ; unset rvm_zsh_clobber
21
+ else
22
+ :
23
+ fi
24
+ }
5
25
 
6
26
  # Query the rvm key-value database for a specific key
7
27
  # Allow overrides from user specifications in $rvm_config_path/user
@@ -469,25 +489,9 @@ __rvm_gemset_select() {
469
489
 
470
490
  rvm_ruby_gem_path="$rvm_ruby_gem_home:$rvm_ruby_global_gems_path"
471
491
 
472
- # Careful not to nuke system gems cache.
473
- if [[ ! -z "$rvm_ruby_gem_home" ]] && [[ ! -z "$(echo $rvm_ruby_gem_home | awk '/rvm/')" ]] ; then
474
- # Ensure that the ruby gem home exists.
475
- mkdir -p "$rvm_ruby_gem_home"
476
-
477
- # If there is a cache *directory* already,
478
- # move all the gems to the global cache directory and remove it.
479
- if [[ -d "$rvm_ruby_gem_home/cache" ]] && [[ ! -L "$rvm_ruby_gem_home/cache" ]] ; then
480
- if [[ ! -z "$(\ls -A "$rvm_ruby_gem_home"/cache/)" ]] ; then
481
- mv "$rvm_ruby_gem_home"/cache/* "$HOME"/.gem/cache/
482
- fi
483
- rmdir "$rvm_ruby_gem_home"/cache
484
- fi
485
-
486
- # If the ruby's gems cache directory is not a symlink to the global cache, symlink it
487
- if [[ ! -L "$rvm_ruby_gem_home/cache" ]] ; then
488
- ln -nfs "$HOME/.gem/cache" "$rvm_ruby_gem_home/cache"
489
- fi
490
- fi ; export rvm_ruby_gem_path rvm_ruby_gem_home
492
+ # Ensure that the ruby gem home exists.
493
+ mkdir -p "$rvm_ruby_gem_home"
494
+ export rvm_ruby_gem_path rvm_ruby_gem_home
491
495
  }
492
496
 
493
497
  # Use a gemset specified by 'rvm_ruby_gem_home'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rvm
3
3
  version: !ruby/object:Gem::Version
4
- hash: 89
4
+ hash: 95
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 33
10
- version: 0.1.33
9
+ - 34
10
+ version: 0.1.34
11
11
  platform: ruby
12
12
  authors:
13
13
  - Wayne E. Seguin
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-05-27 00:00:00 -04:00
18
+ date: 2010-05-29 00:00:00 -04:00
19
19
  default_executable: rvm-install
20
20
  dependencies: []
21
21
 
@@ -36,7 +36,9 @@ files:
36
36
  - binscripts/rvm-update-latest
37
37
  - binscripts/rvmsudo
38
38
  - config/db
39
+ - config/known
39
40
  - config/md5
41
+ - contrib/gemset_snapshot
40
42
  - examples/rvmrc
41
43
  - gemsets/default.gems
42
44
  - gemsets/global.gems