rvm 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -26,6 +26,8 @@ Action
26
26
  tests - runs 'rake test' across selected ruby versions
27
27
  specs - runs 'rake spec' across selected ruby versions
28
28
 
29
+ gems - gems(ets): http://rvm.beginrescueend.com/gemsets/#managing
30
+
29
31
  gemdir - switch to gem directory for installation (new login shell)
30
32
  srcdir - switch to src directory for the current ruby installation
31
33
 
@@ -5,14 +5,20 @@ if [[ -f "$HOME/.rvmrc" ]] ; then source "$HOME/.rvmrc" ; fi
5
5
  if [[ -z "$rvm_path" ]] ; then unset rvm_path ; fi
6
6
 
7
7
  if [[ -z "$rvm_path" ]] ; then
8
+ unset rvm_path
8
9
  if [[ "root" = "$(whoami)" ]] ; then
9
10
  rvm_path="/usr/local/rvm"
10
11
  else
11
- rvm_path="$HOME/.rvm"
12
+ if [[ -d "$HOME/.rvm" ]] && [[ -s "$HOME/.rvm/scripts/rvm" ]]; then
13
+ rvm_path="$HOME/.rvm"
14
+ elif [[ -d "/usr/local/rvm" ]] && [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
15
+ rvm_path="${rvm_path:-"/usr/local/rvm"}"
16
+ fi
12
17
  fi
13
18
  fi
14
19
 
15
- source $rvm_path/scripts/rvm
20
+ rvm_scripts_path="${rvm_scripts_path:-"$rvm_path/scripts"}"
21
+ source $rvm_scripts_path/rvm
16
22
 
17
23
  unset rvm_interactive
18
24
 
@@ -44,7 +44,7 @@ if [[ ! -z "$(which ruby 2>/dev/null | awk '/rvm/{print}')" ]] ; then
44
44
  architecture="$(echo "$(ruby -v)" | sed 's/^.*\[//' | sed 's/\].*$//')"
45
45
  fi
46
46
 
47
- command="prompt=\"[$format]\""
47
+ command="prompt=\"$format\""
48
48
  eval "$command"
49
49
  echo "${prompt/-]/]}"
50
50
  fi
data/config/db CHANGED
@@ -21,7 +21,7 @@ ruby_1.8.6_patch_level=383
21
21
  ruby_1.8.7_patch_level=248
22
22
  jruby_version=1.4.0
23
23
  jruby_repo_url=git://github.com/jruby/jruby.git
24
- jruby_url=http://jruby.kenai.com/downloads/
24
+ jruby_url=http://jruby.kenai.com/downloads
25
25
  macruby_version=nightly
26
26
  macruby_repo_url=git://git.macruby.org/macruby/MacRuby.git
27
27
  macruby_nightly_url=http://macruby.icoretech.org/latest/macruby_nightly-latest.pkg
data/config/md5 CHANGED
@@ -19,7 +19,11 @@ ruby-enterprise-1.8.7-2009.10.tar.gz=3727eef7b6b1b2f31db7d091328d966e
19
19
  ruby-enterprise-1.8.7-20090928.tar.gz=ae00018ce89d95419dfde370fcd485ac
20
20
  rubygems-1.3.5.tgz=6e317335898e73beab15623cdd5f8cff
21
21
  MagLev-22683.Darwin-i386.tar.gz=bf58b17bc2ca62ac0ca9304e8909985c
22
+ MagLev-22725.Darwin-i386.tar.gz=31f615a51c1bd02b002ba502d3af6b9b
23
+ MagLev-22725.Linux-x86_64.tar.gz=b20d1ccf2071537c66d382079db947ae
24
+ GemStone-22725.Linux-x86_64.tar.gz=41747ab3ff3207a007026a8161e286bc
22
25
  GemStone-22683.Darwin-i386.tar.gz=62ff6be1a99ae708e97d6d43eb044e5a
26
+ GemStone-22725.Darwin-i386.tar.gz=a183fd8dc593258a0ca067283414227a
23
27
  zlib-1.2.3.tar.gz=debc62758716a169df9f62e6ab2bc634
24
28
  curl-7.19.7.tar.gz=ecb2e37e45c9933e2a963cabe03670ab
25
29
  jruby-bin-1.3.1.tar.gz=4a95db8fc93ed7219663fbede98b6117
data/install CHANGED
@@ -18,6 +18,8 @@ usage() {
18
18
  "
19
19
  }
20
20
 
21
+ if echo "$*" | grep -q 'trace' ; then echo "$*" ; env | grep '^rvm_' ; set -x ; fi
22
+
21
23
  while [[ $# -gt 0 ]] ; do
22
24
  token="$1" ; shift
23
25
  case "$token" in
@@ -28,9 +30,6 @@ while [[ $# -gt 0 ]] ; do
28
30
  esac
29
31
  done
30
32
 
31
- if [[ -s /etc/rvmrc ]] ; then source /etc/rvmrc ; fi
32
- if [[ -s "$HOME/.rvmrc" ]] ; then source "$HOME/.rvmrc" ; fi
33
-
34
33
  if ! [[ "$rvm_path" =~ /rvm/?$ ]] ; then
35
34
  unset rvm_path
36
35
  if [[ "root" = "$(whoami)" ]] ; then
@@ -56,15 +55,29 @@ source_path="${source_path:-$cwd}"
56
55
 
57
56
  # State what is required to use rvm
58
57
  echo -e "\nInstalling rvm to $rvm_path/ ..."
59
- for dir_name in src scripts bin log archives config gems examples ; do
60
- mkdir -p "$rvm_path/$dir_name"
58
+ rvm_archives_path="${rvm_archives_path:-"$rvm_path/archives"}"
59
+ rvm_src_path="${rvm_src_path:-"$rvm_path/src"}"
60
+ rvm_log_path="${rvm_log_path:-"$rvm_path/log"}"
61
+ rvm_bin_path="${rvm_bin_path:-"$rvm_path/bin"}"
62
+ rvm_gem_path="${rvm_gem_path:-"$rvm_path/gems"}"
63
+ rvm_rubies_path="${rvm_rubies_path:-"$rvm_path/rubies"}"
64
+ rvm_config_path="${rvm_config_path:-"$rvm_path/config"}"
65
+ rvm_hooks_path="${rvm_hooks_path:-"$rvm_path/hooks"}"
66
+ rvm_tmp_path="${rvm_tmp_path:-"$rvm_path/tmp"}"
67
+ rvm_symlink_path="${rvm_symlink_path:-/usr/local/bin}"
68
+ rvm_gem_options="${rvm_gem_options:-"--no-rdoc --no-ri"}"
69
+
70
+ for path in src scripts bin log archives config gem ; do
71
+ eval "mkdir -p '\$rvm_${path}_path/'"
72
+ done
73
+
74
+ for file in README LICENCE ; do
75
+ cp -f "$source_path/$file" "$rvm_path/"
61
76
  done
62
- cp -f "$source_path/README" "$rvm_path/"
63
77
 
64
78
  #
65
79
  # Scripts
66
80
  #
67
- rm -rf $rvm_scripts_path # Clear the old scripts directory so that the old style rvm- scripts are cleared out.
68
81
  for dir_name in config scripts examples lib hooks ; do
69
82
  mkdir -p "$rvm_path/$dir_name"
70
83
  if [[ -d "$source_path/$dir_name" ]] ; then
@@ -73,6 +86,7 @@ for dir_name in config scripts examples lib hooks ; do
73
86
  done ; unset dir_name
74
87
 
75
88
  if [[ ! -s "$rvm_config_path/user" ]] ; then
89
+ mkdir -p "$rvm_config_path/"
76
90
  echo '# Users settings file, overrides db file settings and persists across installs.' >> $rvm_config_path/user
77
91
  fi
78
92
 
@@ -80,8 +94,8 @@ fi
80
94
  # Bin Scripts
81
95
  #
82
96
  # Cleanse and purge...
83
- rm -f $rvm_bin_path/rvm ; rm -rf $rvm_bin_path/binscripts
84
97
  for file in rvm-prompt rvm rvmsudo ; do
98
+ rm -f "$rvm_bin_path/$file"
85
99
  cp -f "$source_path/binscripts/$file" $rvm_bin_path/
86
100
  done
87
101
  chmod +x $rvm_bin_path/*
@@ -154,10 +168,13 @@ echo -e "If I do not respond right away, please hang around after asking your qu
154
168
  echo -e "\n w$(tput setaf 2)⦿‿⦿$(tput sgr0)t!"
155
169
  echo -e "\n ~ Wayne"
156
170
  echo -e "\n********************************************************************************"
157
- echo -e "\n$(tput setaf 1)You must now finish the install manually:$(tput sgr0)"
158
- echo -e "\n1) Place the folowing line at the end of your shell's loading files(.bashrc and then .bash_profile for bash and .zshrc for zsh), after all path/variable settings:"
159
- echo -e "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
160
- echo -e "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
161
- echo -e "\n3) $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
171
+
172
+ if [[ "root" != "$(whoami)" ]] ; then
173
+ echo -e "\n$(tput setaf 1)You must now finish the install manually:$(tput sgr0)"
174
+ echo -e "\n1) Place the folowing line at the end of your shell's loading files(.bashrc and then .bash_profile for bash and .zshrc for zsh), after all path/variable settings:"
175
+ echo -e "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
176
+ echo -e "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
177
+ echo -e "\n3) $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
178
+ fi
162
179
 
163
180
  exit 0
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 1
4
- :patch: 0
4
+ :patch: 1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rvm}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
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-01-16}
12
+ s.date = %q{2010-01-19}
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}
@@ -68,8 +68,13 @@ __rvm_parse_args() {
68
68
  if [[ "$rvm_ruby_string" != "$rvm_gem_set_name" ]] ; then export rvm_ruby_string ; fi
69
69
  if [[ ! -z "$rvm_gem_set_name" ]] ; then export rvm_gem_set_name ; fi
70
70
  else
71
- rvm_gem_set_name="$1" ; shift
72
- export rvm_use_flag=1 # Default is to use the (named) gem set.
71
+ if [[ -z "$1" ]] ; then
72
+ rvm_action="error"
73
+ rvm_error_message="'gems' must be followed by a gems(et) action, see http://rvm.beginrescueend.com/gemsets/#managing for details."
74
+ else
75
+ rvm_gem_set_name="$1" ; shift
76
+ export rvm_use_flag=1 # Default is to use the (named) gem set.
77
+ fi
73
78
  fi
74
79
  ;;
75
80
 
@@ -12,11 +12,9 @@ rvm_project_rvmrc="${rvm_project_rvmrc:-1}"
12
12
  rvm_project_rvmrc_default="${rvm_project_rvmrc_default:-0}"
13
13
 
14
14
  if [[ -z "$rvm_scripts_path" ]] ; then
15
- if [[ -d "$HOME/scripts" ]] && [[ -f "/usr/local/rvm/scripts/rvm" ]]; then
16
- rvm_scripts_path="$HOME/scripts"
17
- elif [[ -d "/usr/local/rvm/scripts" ]] && [[ -f "/usr/local/rvm/scripts/rvm" ]] ; then
18
- rvm_scripts_path="/usr/local/rvm/scripts"
19
- else
15
+ if [[ -d "$HOME/.rvm/scripts" ]] && [[ -s "$HOME/.rvm/scripts/rvm" ]]; then
16
+ rvm_scripts_path="$HOME/.rvm/scripts"
17
+ elif [[ -d "$rvm_path/scripts" ]] && [[ -s "$rvm_path/scripts/rvm" ]]; then
20
18
  rvm_scripts_path="$rvm_path/scripts"
21
19
  fi
22
20
  fi
@@ -18,6 +18,8 @@ usage() {
18
18
  "
19
19
  }
20
20
 
21
+ if echo "$*" | grep -q 'trace' ; then echo "$*" ; env | grep '^rvm_' ; set -x ; fi
22
+
21
23
  while [[ $# -gt 0 ]] ; do
22
24
  token="$1" ; shift
23
25
  case "$token" in
@@ -28,9 +30,6 @@ while [[ $# -gt 0 ]] ; do
28
30
  esac
29
31
  done
30
32
 
31
- if [[ -s /etc/rvmrc ]] ; then source /etc/rvmrc ; fi
32
- if [[ -s "$HOME/.rvmrc" ]] ; then source "$HOME/.rvmrc" ; fi
33
-
34
33
  if ! [[ "$rvm_path" =~ /rvm/?$ ]] ; then
35
34
  unset rvm_path
36
35
  if [[ "root" = "$(whoami)" ]] ; then
@@ -56,15 +55,29 @@ source_path="${source_path:-$cwd}"
56
55
 
57
56
  # State what is required to use rvm
58
57
  echo -e "\nInstalling rvm to $rvm_path/ ..."
59
- for dir_name in src scripts bin log archives config gems examples ; do
60
- mkdir -p "$rvm_path/$dir_name"
58
+ rvm_archives_path="${rvm_archives_path:-"$rvm_path/archives"}"
59
+ rvm_src_path="${rvm_src_path:-"$rvm_path/src"}"
60
+ rvm_log_path="${rvm_log_path:-"$rvm_path/log"}"
61
+ rvm_bin_path="${rvm_bin_path:-"$rvm_path/bin"}"
62
+ rvm_gem_path="${rvm_gem_path:-"$rvm_path/gems"}"
63
+ rvm_rubies_path="${rvm_rubies_path:-"$rvm_path/rubies"}"
64
+ rvm_config_path="${rvm_config_path:-"$rvm_path/config"}"
65
+ rvm_hooks_path="${rvm_hooks_path:-"$rvm_path/hooks"}"
66
+ rvm_tmp_path="${rvm_tmp_path:-"$rvm_path/tmp"}"
67
+ rvm_symlink_path="${rvm_symlink_path:-/usr/local/bin}"
68
+ rvm_gem_options="${rvm_gem_options:-"--no-rdoc --no-ri"}"
69
+
70
+ for path in src scripts bin log archives config gem ; do
71
+ eval "mkdir -p '\$rvm_${path}_path/'"
72
+ done
73
+
74
+ for file in README LICENCE ; do
75
+ cp -f "$source_path/$file" "$rvm_path/"
61
76
  done
62
- cp -f "$source_path/README" "$rvm_path/"
63
77
 
64
78
  #
65
79
  # Scripts
66
80
  #
67
- rm -rf $rvm_scripts_path # Clear the old scripts directory so that the old style rvm- scripts are cleared out.
68
81
  for dir_name in config scripts examples lib hooks ; do
69
82
  mkdir -p "$rvm_path/$dir_name"
70
83
  if [[ -d "$source_path/$dir_name" ]] ; then
@@ -73,6 +86,7 @@ for dir_name in config scripts examples lib hooks ; do
73
86
  done ; unset dir_name
74
87
 
75
88
  if [[ ! -s "$rvm_config_path/user" ]] ; then
89
+ mkdir -p "$rvm_config_path/"
76
90
  echo '# Users settings file, overrides db file settings and persists across installs.' >> $rvm_config_path/user
77
91
  fi
78
92
 
@@ -80,8 +94,8 @@ fi
80
94
  # Bin Scripts
81
95
  #
82
96
  # Cleanse and purge...
83
- rm -f $rvm_bin_path/rvm ; rm -rf $rvm_bin_path/binscripts
84
97
  for file in rvm-prompt rvm rvmsudo ; do
98
+ rm -f "$rvm_bin_path/$file"
85
99
  cp -f "$source_path/binscripts/$file" $rvm_bin_path/
86
100
  done
87
101
  chmod +x $rvm_bin_path/*
@@ -154,10 +168,13 @@ echo -e "If I do not respond right away, please hang around after asking your qu
154
168
  echo -e "\n w$(tput setaf 2)⦿‿⦿$(tput sgr0)t!"
155
169
  echo -e "\n ~ Wayne"
156
170
  echo -e "\n********************************************************************************"
157
- echo -e "\n$(tput setaf 1)You must now finish the install manually:$(tput sgr0)"
158
- echo -e "\n1) Place the folowing line at the end of your shell's loading files(.bashrc and then .bash_profile for bash and .zshrc for zsh), after all path/variable settings:"
159
- echo -e "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
160
- echo -e "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
161
- echo -e "\n3) $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
171
+
172
+ if [[ "root" != "$(whoami)" ]] ; then
173
+ echo -e "\n$(tput setaf 1)You must now finish the install manually:$(tput sgr0)"
174
+ echo -e "\n1) Place the folowing line at the end of your shell's loading files(.bashrc and then .bash_profile for bash and .zshrc for zsh), after all path/variable settings:"
175
+ echo -e "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
176
+ echo -e "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
177
+ echo -e "\n3) $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
178
+ fi
162
179
 
163
180
  exit 0
@@ -61,9 +61,6 @@ fi
61
61
  machine_name="`uname -n`"
62
62
  $rvm_scripts_path/log "info" "Starting installation of $version on $machine_name"
63
63
 
64
- # Do a trivial sudo to test we can and get the password prompt out of the way
65
- sudo date
66
-
67
64
  # Figure out how much total memory is installed
68
65
  $rvm_scripts_path/log "info" "Setting up shared memory"
69
66
  #
@@ -340,7 +340,7 @@ RubyWrapper
340
340
  echo -e "java must be installed and in your path in order to install JRuby." ; return 1
341
341
  fi
342
342
 
343
- mkdir -p "$rvm_ruby_log_path" "$rvm_ruby_src_path"
343
+ mkdir -p "$rvm_ruby_log_path"
344
344
  __rvm_pushpop $rvm_src_path
345
345
  __rvm_fetch_ruby
346
346
  result=$? ; if [[ "$result" -gt 0 ]] ; then
@@ -384,9 +384,9 @@ RubyWrapper
384
384
 
385
385
  $rvm_scripts_path/log "info" "Running MagLev prereqs checking script."
386
386
  $rvm_scripts_path/maglev
387
- result=$? ; if [[ "$result" -gt 0 ]] ; then
388
- $rvm_scripts_path/log "error" "Prerequisite checks have failed. Aborting the installation." ; __rvm_pushpop ; return $result
389
- fi
387
+ result=$? ; if [[ "$result" -gt 0 ]] ; then
388
+ $rvm_scripts_path/log "error" "Prerequisite checks have failed. Aborting the installation." ; __rvm_pushpop ; return $result
389
+ fi
390
390
 
391
391
  mkdir -p "$rvm_ruby_log_path"
392
392
  __rvm_pushpop $rvm_src_path
@@ -399,6 +399,12 @@ RubyWrapper
399
399
  fi
400
400
  fi
401
401
 
402
+ if [[ ! -z "$rvm_head_flag" ]] ; then
403
+ cd $rvm_ruby_src_path
404
+ rvm_gemstone_package_file="GemStone-$(grep ^GEMSTONE version.txt | cut -f2 -d-).$(uname -sm | tr ' ' '-')"
405
+ rvm_gemstone_url="${rvm_gemstone_url:-"$maglev_url/${rvm_gemstone_package_file}.${rvm_archive_extension}"}"
406
+ fi
407
+
402
408
  $rvm_scripts_path/log "info" "Downloading the gemstone package, this may take a while depending on your connection..."
403
409
  $rvm_scripts_path/fetch "$rvm_gemstone_url"
404
410
  result=$? ; if [[ "$result" -gt 0 ]] ; then
@@ -407,7 +413,9 @@ RubyWrapper
407
413
 
408
414
  builtin cd "$rvm_src_path"
409
415
 
410
- mv "$rvm_ruby_package_file" "$rvm_ruby_string"
416
+ if [[ -s "$rvm_ruby_package_file" ]] ; then
417
+ mv "$rvm_ruby_package_file" "$rvm_ruby_src_path"
418
+ fi
411
419
 
412
420
  builtin cd "$rvm_ruby_src_path"
413
421
 
@@ -436,6 +444,11 @@ RubyWrapper
436
444
  done ; unset binary
437
445
 
438
446
  builtin cd "$rvm_ruby_home"
447
+ if [[ ! -z "$rvm_head_flag" ]] ; then
448
+ git submodule update --init
449
+ $rvm_ruby_home/bin/maglev force-reload
450
+ ln -sf maglev.demo.key-$(uname -sm | tr ' ' '-') etc/maglev.demo.key
451
+ fi
439
452
 
440
453
  #ln -fs "$rvm_ruby_home/$(echo $rvm_gemstone_package_file | awk -F'.' '{print $1}')" "$rvm_ruby_home/gemstone"
441
454
 
@@ -42,10 +42,10 @@ if [[ "$rvm_loaded_flag" != "1" ]] || [[ "$rvm_reload_flag" = "1" ]] ; then
42
42
 
43
43
  if [[ -s "$HOME/.rvm/default" ]] ; then
44
44
  source "$HOME/.rvm/default"
45
- elif [[ -s "$rvm_path/default" ]] ; then
46
- source "$rvm_path/default"
47
- elif [[ -s "/usr/local/rvm/default" ]] ; then
48
- source "/usr/local/rvm/default"
45
+ elif [[ -s "$rvm_config_path/default" ]] ; then
46
+ source "$rvm_config_path/default"
47
+ elif [[ -s "/usr/local/rvm/config/default" ]] ; then
48
+ source "/usr/local/rvm/config/default"
49
49
  fi
50
50
  else
51
51
  echo -e "\$rvm_path is not set. rvm cannot load."
@@ -18,6 +18,8 @@ usage() {
18
18
  "
19
19
  }
20
20
 
21
+ if echo "$*" | grep -q 'trace' ; then echo "$*" ; env | grep '^rvm_' ; set -x ; fi
22
+
21
23
  while [[ $# -gt 0 ]] ; do
22
24
  token="$1" ; shift
23
25
  case "$token" in
@@ -28,9 +30,6 @@ while [[ $# -gt 0 ]] ; do
28
30
  esac
29
31
  done
30
32
 
31
- if [[ -s /etc/rvmrc ]] ; then source /etc/rvmrc ; fi
32
- if [[ -s "$HOME/.rvmrc" ]] ; then source "$HOME/.rvmrc" ; fi
33
-
34
33
  if ! [[ "$rvm_path" =~ /rvm/?$ ]] ; then
35
34
  unset rvm_path
36
35
  if [[ "root" = "$(whoami)" ]] ; then
@@ -56,15 +55,29 @@ source_path="${source_path:-$cwd}"
56
55
 
57
56
  # State what is required to use rvm
58
57
  echo -e "\nInstalling rvm to $rvm_path/ ..."
59
- for dir_name in src scripts bin log archives config gems examples ; do
60
- mkdir -p "$rvm_path/$dir_name"
58
+ rvm_archives_path="${rvm_archives_path:-"$rvm_path/archives"}"
59
+ rvm_src_path="${rvm_src_path:-"$rvm_path/src"}"
60
+ rvm_log_path="${rvm_log_path:-"$rvm_path/log"}"
61
+ rvm_bin_path="${rvm_bin_path:-"$rvm_path/bin"}"
62
+ rvm_gem_path="${rvm_gem_path:-"$rvm_path/gems"}"
63
+ rvm_rubies_path="${rvm_rubies_path:-"$rvm_path/rubies"}"
64
+ rvm_config_path="${rvm_config_path:-"$rvm_path/config"}"
65
+ rvm_hooks_path="${rvm_hooks_path:-"$rvm_path/hooks"}"
66
+ rvm_tmp_path="${rvm_tmp_path:-"$rvm_path/tmp"}"
67
+ rvm_symlink_path="${rvm_symlink_path:-/usr/local/bin}"
68
+ rvm_gem_options="${rvm_gem_options:-"--no-rdoc --no-ri"}"
69
+
70
+ for path in src scripts bin log archives config gem ; do
71
+ eval "mkdir -p '\$rvm_${path}_path/'"
72
+ done
73
+
74
+ for file in README LICENCE ; do
75
+ cp -f "$source_path/$file" "$rvm_path/"
61
76
  done
62
- cp -f "$source_path/README" "$rvm_path/"
63
77
 
64
78
  #
65
79
  # Scripts
66
80
  #
67
- rm -rf $rvm_scripts_path # Clear the old scripts directory so that the old style rvm- scripts are cleared out.
68
81
  for dir_name in config scripts examples lib hooks ; do
69
82
  mkdir -p "$rvm_path/$dir_name"
70
83
  if [[ -d "$source_path/$dir_name" ]] ; then
@@ -73,6 +86,7 @@ for dir_name in config scripts examples lib hooks ; do
73
86
  done ; unset dir_name
74
87
 
75
88
  if [[ ! -s "$rvm_config_path/user" ]] ; then
89
+ mkdir -p "$rvm_config_path/"
76
90
  echo '# Users settings file, overrides db file settings and persists across installs.' >> $rvm_config_path/user
77
91
  fi
78
92
 
@@ -80,8 +94,8 @@ fi
80
94
  # Bin Scripts
81
95
  #
82
96
  # Cleanse and purge...
83
- rm -f $rvm_bin_path/rvm ; rm -rf $rvm_bin_path/binscripts
84
97
  for file in rvm-prompt rvm rvmsudo ; do
98
+ rm -f "$rvm_bin_path/$file"
85
99
  cp -f "$source_path/binscripts/$file" $rvm_bin_path/
86
100
  done
87
101
  chmod +x $rvm_bin_path/*
@@ -154,10 +168,13 @@ echo -e "If I do not respond right away, please hang around after asking your qu
154
168
  echo -e "\n w$(tput setaf 2)⦿‿⦿$(tput sgr0)t!"
155
169
  echo -e "\n ~ Wayne"
156
170
  echo -e "\n********************************************************************************"
157
- echo -e "\n$(tput setaf 1)You must now finish the install manually:$(tput sgr0)"
158
- echo -e "\n1) Place the folowing line at the end of your shell's loading files(.bashrc and then .bash_profile for bash and .zshrc for zsh), after all path/variable settings:"
159
- echo -e "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
160
- echo -e "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
161
- echo -e "\n3) $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
171
+
172
+ if [[ "root" != "$(whoami)" ]] ; then
173
+ echo -e "\n$(tput setaf 1)You must now finish the install manually:$(tput sgr0)"
174
+ echo -e "\n1) Place the folowing line at the end of your shell's loading files(.bashrc and then .bash_profile for bash and .zshrc for zsh), after all path/variable settings:"
175
+ echo -e "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
176
+ echo -e "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
177
+ echo -e "\n3) $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
178
+ fi
162
179
 
163
180
  exit 0
@@ -67,6 +67,7 @@ __rvm_select() {
67
67
  rvm_ruby_repo_url="${rvm_ruby_repo_url:-$(__rvm_db "jruby_repo_url")}"
68
68
  rvm_url="${rvm_ruby_repo_url:-$(__rvm_db "jruby_repo_url")}"
69
69
  else
70
+ rvm_archive_extension="zip"
70
71
  rvm_ruby_version="${rvm_ruby_version:-"$(__rvm_db "jruby_version")"}"
71
72
  rvm_ruby_package_file="${rvm_ruby_interpreter}-bin-${rvm_ruby_version}"
72
73
  rvm_ruby_package_name="${rvm_ruby_interpreter}-${rvm_ruby_version}"
@@ -79,6 +80,7 @@ __rvm_select() {
79
80
 
80
81
  maglev)
81
82
  unset rvm_ruby_patch_level
83
+ maglev_url="$(__rvm_db "maglev_url")"
82
84
  if [[ ! -z "$rvm_head_flag" ]] ; then
83
85
  rvm_ruby_version="head"
84
86
  rvm_ruby_string="maglev-head"
@@ -87,21 +89,11 @@ __rvm_select() {
87
89
  else
88
90
  system="$(uname -s)"
89
91
  arch="$(uname -m)"
90
- # It would be nice if we didn't have to do this if..else..
91
- #if [[ "Darwin" = "$system" ]] ; then
92
- # rvm_ruby_package_file="MagLev-${rvm_ruby_version}.MacOSX"
93
- # rvm_gemstone_package_file="GemStone-${rvm_ruby_version}.MacOSX"
94
- #elif [[ "SunOS" = "$system" ]] && [[ "i86pc" = "$(uname -m)" ]] ; then
95
- # rvm_ruby_package_file="MagLev-${rvm_ruby_version}.Solaris-x86"
96
- # rvm_gemstone_package_file="GemStone-${rvm_ruby_version}.Solaris-x86"
97
- #else
98
92
  rvm_ruby_package_file="MagLev-${rvm_ruby_version}.${system}-${arch}"
99
93
  rvm_gemstone_package_file="GemStone-${rvm_ruby_version}.${system}-${arch}"
100
- #fi
101
94
  rvm_ruby_version="${rvm_ruby_version:-"$(__rvm_db "maglev_version")"}"
102
95
  rvm_ruby_package_name="${rvm_ruby_interpreter}-${rvm_ruby_version}"
103
96
  rvm_ruby_string="${rvm_ruby_interpreter}-${rvm_ruby_version}"
104
- maglev_url="$(__rvm_db "maglev_url")"
105
97
  rvm_url="${rvm_ruby_url:-"$maglev_url/${rvm_ruby_package_file}.${rvm_archive_extension}"}"
106
98
  rvm_gemstone_url="${rvm_gemstone_url:-"$maglev_url/${rvm_gemstone_package_file}.${rvm_archive_extension}"}"
107
99
  export MAGLEV_HOME="$rvm_rubies_path/$rvm_ruby_string"
@@ -231,9 +223,9 @@ __rvm_use() {
231
223
  new_path=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
232
224
  new_path=$rvm_bin_path:$new_path
233
225
 
234
- if [[ -s $rvm_path/default ]] ; then
226
+ if [[ -s $rvm_config_path/default ]] ; then
235
227
  unset new_path
236
- source $rvm_path/default
228
+ source $rvm_config_path/default
237
229
  if [[ ! -z "$rvm_verbose_flag" ]] ; then
238
230
  $rvm_scripts_path/log "info" "Now using default ruby."
239
231
  fi
@@ -241,7 +233,7 @@ __rvm_use() {
241
233
  rvm_ruby_interpreter="system"
242
234
  $rvm_scripts_path/log "warn" "no default rvm specified, defaulting to pre-rvm system."
243
235
  unset GEM_HOME GEM_PATH MY_RUBY_HOME RUBY_VERSION IRBRC
244
- if [[ -s $rvm_path/system ]] ; then source $rvm_path/system ; fi
236
+ if [[ -s $rvm_config_path/system ]] ; then source $rvm_config_path/system ; fi
245
237
  fi
246
238
 
247
239
  elif [[ "system" = "$rvm_ruby_interpreter" ]] ; then
@@ -249,12 +241,12 @@ __rvm_use() {
249
241
  unset GEM_HOME GEM_PATH MY_RUBY_HOME RUBY_VERSION IRBRC
250
242
  new_path=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
251
243
  new_path=$rvm_bin_path:$new_path
252
- if [[ -s $rvm_path/system ]] ; then
253
- grep "MY_RUBY_HOME='$rvm_rubies_path" "$rvm_path/system" > /dev/null
244
+ if [[ -s $rvm_config_path/system ]] ; then
245
+ grep "MY_RUBY_HOME='$rvm_rubies_path" "$rvm_config_path/system" > /dev/null
254
246
  if [[ $? -eq 0 ]] ; then
255
- rm -f $rvm_path/system # 'system' should *not* point to an rvm ruby.
247
+ rm -f $rvm_config_path/system # 'system' should *not* point to an rvm ruby.
256
248
  else
257
- source $rvm_path/system
249
+ source $rvm_config_path/system
258
250
  fi
259
251
  fi
260
252
 
@@ -310,21 +302,21 @@ __rvm_use() {
310
302
  fi
311
303
 
312
304
  if [[ "system" = "$rvm_ruby_interpreter" ]] ; then
313
- rm -f $rvm_path/default
305
+ rm -f $rvm_config_path/default
314
306
  rm -f $rvm_bin_path/default*
315
307
  else
316
308
  RUBY_VERSION="$($rvm_ruby_home/bin/ruby -v | sed 's#^\(.*\) (.*$#\1#')"
317
309
  export GEM_HOME GEM_PATH MY_RUBY_HOME RUBY_VERSION
318
310
 
319
- echo "export PATH=\"$rvm_ruby_home/bin:$rvm_ruby_gem_home/bin:$rvm_bin_path:\$PATH\"" > $rvm_path/default
311
+ echo "export PATH=\"$rvm_ruby_home/bin:$rvm_ruby_gem_home/bin:$rvm_bin_path:\$PATH\"" > $rvm_config_path/default
320
312
 
321
313
  for variable in RUBY_VERSION GEM_HOME GEM_PATH MY_RUBY_HOME IRBRC rvm_ruby_string rvm_gem_set_name MAGLEV_HOME ; do
322
314
  eval "export $variable"
323
315
  eval value=\$${variable}
324
316
  if [[ ! -z "$value" ]] ; then
325
- echo "export ${variable}='$value'" >> $rvm_path/default
317
+ echo "export ${variable}='$value'" >> $rvm_config_path/default
326
318
  else
327
- echo "unset ${variable}" >> $rvm_path/default
319
+ echo "unset ${variable}" >> $rvm_config_path/default
328
320
  fi
329
321
  done ; unset variable value
330
322
 
@@ -424,6 +416,8 @@ __rvm_ruby_string() {
424
416
  elif $rvm_scripts_path/match "$string" "^u[a-z0-9]" ; then
425
417
  unset rvm_ruby_patch_level rvm_ruby_revision rvm_ruby_tag rvm_ruby_patch
426
418
  rvm_ruby_user_tag="$string"
419
+ elif $rvm_scripts_path/match "$string" "^b[0-9][0-9]" ; then
420
+ rvm_ruby_bits="$string"
427
421
  elif $rvm_scripts_path/match "ruby rbx jruby macruby ree rubinius maglev mput shyouhei ironruby" "$string" ; then
428
422
  rvm_ruby_interpreter="$string"
429
423
  else
@@ -18,6 +18,8 @@ usage() {
18
18
  "
19
19
  }
20
20
 
21
+ if echo "$*" | grep -q 'trace' ; then echo "$*" ; env | grep '^rvm_' ; set -x ; fi
22
+
21
23
  while [[ $# -gt 0 ]] ; do
22
24
  token="$1" ; shift
23
25
  case "$token" in
@@ -28,9 +30,6 @@ while [[ $# -gt 0 ]] ; do
28
30
  esac
29
31
  done
30
32
 
31
- if [[ -s /etc/rvmrc ]] ; then source /etc/rvmrc ; fi
32
- if [[ -s "$HOME/.rvmrc" ]] ; then source "$HOME/.rvmrc" ; fi
33
-
34
33
  if ! [[ "$rvm_path" =~ /rvm/?$ ]] ; then
35
34
  unset rvm_path
36
35
  if [[ "root" = "$(whoami)" ]] ; then
@@ -56,15 +55,29 @@ source_path="${source_path:-$cwd}"
56
55
 
57
56
  # State what is required to use rvm
58
57
  echo -e "\nInstalling rvm to $rvm_path/ ..."
59
- for dir_name in src scripts bin log archives config gems examples ; do
60
- mkdir -p "$rvm_path/$dir_name"
58
+ rvm_archives_path="${rvm_archives_path:-"$rvm_path/archives"}"
59
+ rvm_src_path="${rvm_src_path:-"$rvm_path/src"}"
60
+ rvm_log_path="${rvm_log_path:-"$rvm_path/log"}"
61
+ rvm_bin_path="${rvm_bin_path:-"$rvm_path/bin"}"
62
+ rvm_gem_path="${rvm_gem_path:-"$rvm_path/gems"}"
63
+ rvm_rubies_path="${rvm_rubies_path:-"$rvm_path/rubies"}"
64
+ rvm_config_path="${rvm_config_path:-"$rvm_path/config"}"
65
+ rvm_hooks_path="${rvm_hooks_path:-"$rvm_path/hooks"}"
66
+ rvm_tmp_path="${rvm_tmp_path:-"$rvm_path/tmp"}"
67
+ rvm_symlink_path="${rvm_symlink_path:-/usr/local/bin}"
68
+ rvm_gem_options="${rvm_gem_options:-"--no-rdoc --no-ri"}"
69
+
70
+ for path in src scripts bin log archives config gem ; do
71
+ eval "mkdir -p '\$rvm_${path}_path/'"
72
+ done
73
+
74
+ for file in README LICENCE ; do
75
+ cp -f "$source_path/$file" "$rvm_path/"
61
76
  done
62
- cp -f "$source_path/README" "$rvm_path/"
63
77
 
64
78
  #
65
79
  # Scripts
66
80
  #
67
- rm -rf $rvm_scripts_path # Clear the old scripts directory so that the old style rvm- scripts are cleared out.
68
81
  for dir_name in config scripts examples lib hooks ; do
69
82
  mkdir -p "$rvm_path/$dir_name"
70
83
  if [[ -d "$source_path/$dir_name" ]] ; then
@@ -73,6 +86,7 @@ for dir_name in config scripts examples lib hooks ; do
73
86
  done ; unset dir_name
74
87
 
75
88
  if [[ ! -s "$rvm_config_path/user" ]] ; then
89
+ mkdir -p "$rvm_config_path/"
76
90
  echo '# Users settings file, overrides db file settings and persists across installs.' >> $rvm_config_path/user
77
91
  fi
78
92
 
@@ -80,8 +94,8 @@ fi
80
94
  # Bin Scripts
81
95
  #
82
96
  # Cleanse and purge...
83
- rm -f $rvm_bin_path/rvm ; rm -rf $rvm_bin_path/binscripts
84
97
  for file in rvm-prompt rvm rvmsudo ; do
98
+ rm -f "$rvm_bin_path/$file"
85
99
  cp -f "$source_path/binscripts/$file" $rvm_bin_path/
86
100
  done
87
101
  chmod +x $rvm_bin_path/*
@@ -154,10 +168,13 @@ echo -e "If I do not respond right away, please hang around after asking your qu
154
168
  echo -e "\n w$(tput setaf 2)⦿‿⦿$(tput sgr0)t!"
155
169
  echo -e "\n ~ Wayne"
156
170
  echo -e "\n********************************************************************************"
157
- echo -e "\n$(tput setaf 1)You must now finish the install manually:$(tput sgr0)"
158
- echo -e "\n1) Place the folowing line at the end of your shell's loading files(.bashrc and then .bash_profile for bash and .zshrc for zsh), after all path/variable settings:"
159
- echo -e "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
160
- echo -e "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
161
- echo -e "\n3) $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
171
+
172
+ if [[ "root" != "$(whoami)" ]] ; then
173
+ echo -e "\n$(tput setaf 1)You must now finish the install manually:$(tput sgr0)"
174
+ echo -e "\n1) Place the folowing line at the end of your shell's loading files(.bashrc and then .bash_profile for bash and .zshrc for zsh), after all path/variable settings:"
175
+ echo -e "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
176
+ echo -e "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
177
+ echo -e "\n3) $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
178
+ fi
162
179
 
163
180
  exit 0
@@ -76,9 +76,9 @@ __rvm_debug() {
76
76
  done
77
77
 
78
78
  if [[ "root" = "$(whoami)" ]] ; then
79
- debug_files="$rvm_path/default $rvm_path/system $rvm_config_path/db /etc/rvmrc /etc/gemrc"
79
+ debug_files="$rvm_config_path/default $rvm_config_path/system $rvm_config_path/db /etc/rvmrc /etc/gemrc"
80
80
  else
81
- debug_files="$rvm_path/default $rvm_path/system $rvm_config_path/db $HOME/.rvmrc $HOME/.gemrc"
81
+ debug_files="$rvm_config_path/default $rvm_config_path/system $rvm_config_path/db $HOME/.rvmrc $HOME/.gemrc"
82
82
  fi
83
83
 
84
84
  for file_name in $(echo $debug_files); do
@@ -134,7 +134,10 @@ __rvm_run() {
134
134
 
135
135
  __rvm_cleanup_variables() {
136
136
  __rvm_unset_ruby_variables
137
- 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 rvm_uninstall_flag rvm_install_flag rvm_llvm_flag
137
+
138
+ if [[ "$rvm_sticky_gems" = "1" ]] ; then export rvm_gem_set_name ; else unset rvm_gem_set_name ; fi
139
+
140
+ unset rvm_action rvm_irbrc_file rvm_command rvm_error_message 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 rvm_uninstall_flag rvm_install_flag rvm_llvm_flag rvm_ruby_bits
138
141
  }
139
142
 
140
143
  __rvm_unset_ruby_variables() {
@@ -176,15 +179,15 @@ RubyWrapper
176
179
  }
177
180
 
178
181
  __rvm_load_defaults() {
179
- if [[ ! -s "$rvm_path/system" ]] ; then
182
+ if [[ ! -s "$rvm_config_path/system" ]] ; then
180
183
  for variable in RUBY_VERSION GEM_HOME GEM_PATH MY_RUBY_HOME ; do
181
184
  eval value=\$${variable}
182
185
  if [[ -z "$value" ]] ; then
183
- echo "unset ${variable}" >> $rvm_path/system
186
+ echo "unset ${variable}" >> $rvm_config_path/system
184
187
  else
185
188
  eval "export $variable"
186
189
  eval value=\$${variable}
187
- echo "${variable}='$value' ; export ${variable}" >> $rvm_path/system
190
+ echo "${variable}='$value' ; export ${variable}" >> $rvm_config_path/system
188
191
  fi
189
192
  done
190
193
  fi
@@ -307,8 +310,8 @@ __rvm_list() {
307
310
  fi
308
311
  done ; unset version
309
312
 
310
- if [[ -f "$rvm_path/default" ]] && [[ -s $rvm_path/default ]] ; then
311
- version=$(grep 'MY_RUBY_HOME' $rvm_path/default | awk -F"'" '{print $2}' | xargs basename)
313
+ if [[ -f "$rvm_config_path/default" ]] && [[ -s $rvm_config_path/default ]] ; then
314
+ version=$(grep 'MY_RUBY_HOME' $rvm_config_path/default | awk -F"'" '{print $2}' | xargs basename)
312
315
  if [[ ! -z "$version" ]] ; then
313
316
  string="[ $(file $rvm_rubies_path/$version/bin/ruby | awk '/x86.64/ {print "x86_64"} /386/ {print "i386"} /ppc/ {print "ppc"}' | tr "\n" ' ')]"
314
317
  if [[ "$version" = "$current_ruby" ]] ; then
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.1.0
4
+ version: 0.1.1
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: 2010-01-16 00:00:00 -05:00
12
+ date: 2010-01-19 00:00:00 -05:00
13
13
  default_executable: rvm-install
14
14
  dependencies: []
15
15