rvm 0.1.11 → 0.1.12

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/config/md5 CHANGED
@@ -39,8 +39,7 @@ GemStone-22816.Darwin-i386.tar.gz=b12426c17b3925f1c8c7086a3285f15f
39
39
  GemStone-22816.Linux-x86_64.tar.gz=21d1e8e7a4b10ac8a1c199eb0cbfaec1
40
40
  MagLev-22816.Darwin-i386.tar.gz=b1b3e6530e90d7dcf36f81e097776643
41
41
  MagLev-22816.Linux-x86_64.tar.gz=424ca92c34cfce6d0da63170755b000c
42
- zlib-1.2.3.tar.gz=debc62758716a169df9f62e6ab2bc634
43
- curl-7.19.7.tar.gz=ecb2e37e45c9933e2a963cabe03670ab
42
+ MacRuby%200.5.zip=675454a8c7bc19d606d90a726e08427c
44
43
  jruby-bin-1.3.1.tar.gz=4a95db8fc93ed7219663fbede98b6117
45
44
  jruby-bin-1.4.0.tar.gz=f37322c18e9134e91e064aebb4baa4c7
46
45
  libiconv-1.13.1.tar.gz=7ab33ebd26687c744a37264a330bbe9a
@@ -48,4 +47,6 @@ ncurses.tar.gz=cce05daf61a64501ef6cd8da1f727ec6
48
47
  openssl-0.9.8k.tar.gz=e555c6d58d276aec7fdc53363e338ab3
49
48
  readline-5.2.tar.gz=e39331f32ad14009b9ff49cc10c5e751
50
49
  readline-6.0.tar.gz=b7f65a48add447693be6e86f04a63019
51
- MacRuby%200.5.zip=675454a8c7bc19d606d90a726e08427c
50
+ zlib-1.2.3.tar.gz=debc62758716a169df9f62e6ab2bc634
51
+ curl-7.19.7.tar.gz=ecb2e37e45c9933e2a963cabe03670ab
52
+ pkg-config-0.23.tar.gz=d922a88782b64441d06547632fd85744
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 1
4
- :patch: 11
4
+ :patch: 12
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rvm}
8
- s.version = "0.1.11"
8
+ s.version = "0.1.12"
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-02-07}
12
+ s.date = %q{2010-02-09}
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}
@@ -39,7 +39,6 @@ Gem::Specification.new do |s|
39
39
  "scripts/cd",
40
40
  "scripts/cli",
41
41
  "scripts/color",
42
- "scripts/completion",
43
42
  "scripts/db",
44
43
  "scripts/fetch",
45
44
  "scripts/functions",
@@ -170,16 +170,15 @@ __rvm_parse_args() {
170
170
  ;;
171
171
 
172
172
  # For use with --patch
173
- --patch-name) rvm_ruby_patch_name="$1" ; shift ;;
173
+ --patch-name) export rvm_ruby_patch_name="$1" ; shift ;;
174
174
 
175
175
  -h|--patch)
176
176
  if [[ -z "$rvm_ruby_patch" ]] ; then
177
- rvm_ruby_patch="$1";
177
+ export rvm_ruby_patch="$1"
178
178
  else
179
- rvm_ruby_patch="$rvm_ruby_patch,$1";
180
- fi
179
+ export rvm_ruby_patch="$rvm_ruby_patch,$1";
180
+ fi ; shift
181
181
  rvm_action="${rvm_action:-use}"
182
- shift
183
182
  ;;
184
183
 
185
184
  --head)
@@ -261,9 +260,8 @@ __rvm_parse_args() {
261
260
  rvm_ruby_string="$rvm_token"
262
261
  ;;
263
262
 
264
- --install) export rvm_install_on_use_flag=1 ;;
265
263
  -h|--help|usage|help) rvm_action=help ;;
266
- -G|--gems) rvm_gems_path="$1" ; shift ;;
264
+ -G|--gems) rvm_gems_path="$1" ; shift ;;
267
265
  --source) rvm_src_path="$1" ; shift ;;
268
266
  --archives) rvm_archives_path="$1" ; shift ;;
269
267
  --make) rvm_ruby_make="$1" ; shift ;;
@@ -274,11 +272,13 @@ __rvm_parse_args() {
274
272
  -m|--gem-set) rvm_gem_set_name="$1" ; shift ;;
275
273
  --sdk) rvm_sdk="$1" ; shift ;;
276
274
  --archflags) rvm_archflags="$1" ; shift ;;
277
- --trace) export rvm_trace_flag=1 ; set -x ;;
278
275
  --symlink) rvm_symlink_name="$1" ; shift ;;
279
276
  tests|specs) rvm_action="tests" ;;
280
- --disable-llvm|--disable-jit) export rvm_llvm_flag=0 ;;
281
- --enable-llvm|--enable-jit) export rvm_llvm_flag=1 ;;
277
+ --install) export rvm_install_on_use_flag=1 ;;
278
+ --trace) export rvm_trace_flag=1 ; set -x ;;
279
+ --proxy) export rvm_proxy="$1" ; shift ;;
280
+ --disable-llvm|--disable-jit) export rvm_llvm_flag=0 ;;
281
+ --enable-llvm|--enable-jit) export rvm_llvm_flag=1 ;;
282
282
 
283
283
  --self|--gem|--rubygems|--reconfigure|--default|--debug|--force|--all|--dump|--summary|--latest|--yaml|--json|--archive|--shebang|--env|--path|--tail|--delete|--verbose|--load|--passenger|--editor)
284
284
  export rvm_$(echo $rvm_token | sed 's#-##g')_flag=1
@@ -16,6 +16,8 @@ record_md5() {
16
16
  if ! which curl &> /dev/null; then
17
17
  $rvm_scripts_path/log "fail" "rvm requires curl, which does not seem to exist in your path :("
18
18
  exit 1
19
+ elif [[ ! -z ${rvm_proxy} ]] ; then
20
+ fetch_command="curl -x${rvm_proxy} -O -L --create-dirs -C - " # -s for silent
19
21
  else
20
22
  fetch_command="curl -O -L --create-dirs -C - " # -s for silent
21
23
  fi
@@ -131,7 +131,7 @@ __rvm_gems_load() {
131
131
  while read -r line
132
132
  do # Keep this on 2nd line :(
133
133
  if [[ ! -z "$(echo $line | sed 's/\s//g')" ]] ; then
134
- __rvm_gem_install $line
134
+ gems_args="$line" ; __rvm_gem_install
135
135
  fi
136
136
  done < <(awk '/^[^#]+/{print}' "${rvm_file_name}")
137
137
  else
@@ -139,10 +139,9 @@ __rvm_gems_load() {
139
139
  fi
140
140
  }
141
141
 
142
- __rvm_parse_gem_line() {
143
- line="$*"
144
- gem="$(echo $line | awk -F';' '{print $1}')"
145
- gem_prefix="$(echo $line | awk -F';' '{print $2}')"
142
+ __rvm_parse_gem_args() {
143
+ gem="$(echo $gems_args | awk -F';' '{print $1}')"
144
+ gem_prefix="$(echo $gems_args | awk -F';' '{print $2}')"
146
145
  if $rvm_scripts_path/match "$gem" "\.gem$" ; then
147
146
  gem_name="$(basename $gem | sed 's#\.gem##' | awk -F'-' '{$NF=NULL;print}')"
148
147
  gem_version="$(basename $gem | sed 's#\.gem##' | awk -F'-' '{print $NF}' )"
@@ -173,8 +172,10 @@ __rvm_parse_gem_line() {
173
172
 
174
173
  # Install a gem
175
174
  __rvm_gem_install() {
176
- __rvm_parse_gem_line $*
175
+ # First we parse the gem args to pick apart the pieces.
176
+ __rvm_parse_gem_args
177
177
 
178
+ # Now we determine if a .gem cache file is already installed
178
179
  if [[ -z "$rvm_force_flag" ]] && [[ -f "${rvm_ruby_gem_home}/specifications/$(basename $gem_file_name)spec" ]] ; then
179
180
  unset gem
180
181
  $rvm_scripts_path/log "info" "$color_green$gem_name $gem_version$yellow exists, skipping (--force to re-install)"
@@ -201,6 +202,7 @@ __rvm_gem_install() {
201
202
 
202
203
  if [[ -z "$rvm_force_flag" ]] && [[ -f "${rvm_ruby_gem_home}/specifications/$(basename $gem_file_name)spec" ]] ; then
203
204
  unset gem # already installed, not forcing reinstall.
205
+ $rvm_scripts_path/log "info" "$color_green$gem_name $gem_version$yellow exists, skipping (--force to re-install)"
204
206
  else
205
207
  if [[ -s "$rvm_gems_path/cache/$(basename $gem_file_name)" ]] ; then
206
208
  mkdir -p "$rvm_tmp_path/$$/"
@@ -213,23 +215,24 @@ __rvm_gem_install() {
213
215
  fi
214
216
  fi
215
217
 
218
+ # If $gem is still set, go forward with the install.
216
219
  if [[ ! -z "$gem" ]] ; then
217
220
  # TODO: Set vars if fourth field is non-empty (means that there are conditional statements to execute in the gem install line.
218
221
  if [[ "rvm_make_flags_flag" -eq 1 ]] ; then __rvm_make_flags ; fi
219
222
 
220
223
  if [[ ! -z "$rvm_ruby_gem_home" ]] && [[ "$rvm_ruby_gem_home" != "$rvm_gems_path" ]] ; then
221
- command="export GEM_HOME='$GEM_HOME' ; export GEM_PATH='$GEM_PATH' ; $gem_prefix gem install $rvm_gem_options $gem $gem_postfix $vars"
224
+ command="GEM_HOME='$rvm_ruby_gem_home' GEM_PATH='$rvm_ruby_gem_home/bin:$rvm_gems_path/$rvm_ruby_string%global/bin' $gem_prefix gem install $gems_args $rvm_gem_options $gem_postfix $vars"
222
225
  else
223
- command="$gem_prefix gem install $rvm_gem_options -q $gem $gem_postfix $vars"
226
+ command="$gem_prefix gem install $gems_args $rvm_gem_options -q $gem $gem_postfix $vars"
224
227
  fi
225
228
  __rvm_run "gem.install" "$command" "$gem_name $gem_version is not installed, installing..."
226
229
  result=$?
227
230
  if [[ $result -eq 0 ]] ; then
228
- $rvm_scripts_path/log "info" "$color_green$gem_name $gem_version$color_none installed."
231
+ $rvm_scripts_path/log "info" "$gem_name $gem_version installed."
229
232
  else
230
- $rvm_scripts_path/log "error" "$color_red$gem_name $gem_version$color_none failed to install, output has been logged to:\n$rvm_path/log/$rvm_ruby_string/gem.install.error.log"
233
+ $rvm_scripts_path/log "error" "$gem_name $gem_version failed to install, output has been logged to:\n$rvm_path/log/$rvm_ruby_string/gem.install.error.log"
231
234
  fi
232
- fi ; unset gem gem_prefix gem_name gem_version gem_file_name gem_postfix cache_file gem_file_name gem_string
235
+ fi ; unset gem gem_prefix gem_name gem_version gem_file_name gem_postfix cache_file gem_file_name gem_string gem_action
233
236
 
234
237
  return $result
235
238
  }
@@ -20,6 +20,7 @@ rvm_rubies_path="${rvm_rubies_path:-"$rvm_path/rubies"}"
20
20
  rvm_config_path="${rvm_config_path:-"$rvm_path/config"}"
21
21
  rvm_hooks_path="${rvm_hooks_path:-"$rvm_path/hooks"}"
22
22
  rvm_tmp_path="${rvm_tmp_path:-"$rvm_path/tmp"}"
23
+ rvm_usr_path="${rvm_usr_path:-"$rvm_path/usr"}"
23
24
  rvm_symlink_path="${rvm_symlink_path:-/usr/local/bin}"
24
25
 
25
26
  export rvm_path rvm_rubies_path rvm_scripts_path rvm_archives_path rvm_src_path rvm_log_path rvm_bin_path rvm_gems_path rvm_config_path rvm_tmp_path rvm_hooks_path
@@ -3,136 +3,122 @@
3
3
  #
4
4
  # ruby supporting libraries:
5
5
  #
6
- __rvm_readline_install() {
7
- if [[ ! -z "$rvm_make_flags_flag" ]] ; then __rvm_make_flags ; fi
8
- __rvm_pushpop $rvm_src_path
9
- package="readline" ; version="5.2" ; archive_format="tar.gz"
10
- # TODO: Figure out how to list, grab and apply the patches
11
- #ftp://ftp.cwru.edu/pub/bash/readline-6.0.tar.gz
12
- for version in 5.2 6.0 ; do
13
- $rvm_scripts_path/log "info" "Retrieving $package-$version.$archive_format"
14
- $rvm_scripts_path/fetch "ftp://ftp.gnu.org/gnu/readline/$package-$version.$archive_format" || (result=$? && return $result)
15
- __rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format"
16
- builtin cd "$rvm_src_path/$package-$version"
17
- if [[ "Darwin" = "$(uname)" ]] ; then
18
- #sdk=$(\ls -t /Developer/SDKs/ | head -n 1)
19
- #CFLAGS="-isysroot /Developer/SDKs/$sdk -arch i386 -arch x86_64"
20
- #LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/$sdk -arch i386 -arch x86_64"
21
- #export CFLAGS LDFLAGS
22
- __rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr --disable-dependency-tracking --disable-static --enable-shared" "Configuring $package"
23
- else
24
- __rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr --disable-dependency-tracking --disable-static --enable-shared" "Configuring $package"
25
- fi
26
-
27
- if [[ "$rvm_uninstall_flag" -eq 1 ]] || [[ "$rvm_remove_flag" -eq 1 ]] ; then
28
- __rvm_run "$package/make.uninstall" "/usr/bin/make uninstall" "uninstalling $package from $rvm_path/usr"
29
- else
30
- __rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package"
31
- __rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_path/usr"
32
- fi
33
- done
34
- __rvm_pushpop
35
- }
6
+ __rvm_install_package() {
36
7
 
37
- __rvm_iconv_install() {
38
8
  if [[ ! -z "$rvm_make_flags_flag" ]] ; then __rvm_make_flags ; fi
9
+
39
10
  __rvm_pushpop $rvm_src_path
40
- __rvm_pushpop $rvm_src_path
41
- package="libiconv" ; version=1.13.1 ; archive_format="tar.gz"
42
- $rvm_scripts_path/log "info" "Retrieving $package-$version.$archive_format"
43
- $rvm_scripts_path/fetch "http://ftp.gnu.org/pub/gnu/libiconv/$package-$version.$archive_format" || (result=$? && return $result)
44
- __rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format"
11
+
12
+ $rvm_scripts_path/log "info" "Fetching $package-$version.$archive_format to $rvm_archives_path"
13
+
14
+ if [[ "$archive_format" = "tar.gz" ]] || [[ "$archive_format" = "tgz" ]] ; then
15
+ $rvm_scripts_path/fetch "$package_url/$package-$version.$archive_format" || (result=$? && return $result)
16
+ __rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format to $rvm_src_path"
17
+ elif [[ "$archive_format" = "tar.bz2" ]] ; then
18
+ $rvm_scripts_path/fetch "$package_url/$package-$version.$archive_format" || (result=$? && return $result)
19
+ __rvm_run "$package/extract" "tar jxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format to $rvm_src_path"
20
+ elif [[ "$archive_format" = "zip" ]] ; then
21
+ $rvm_scripts_path/fetch "$package_url/$package-$version.$archive_format" || (result=$? && return $result)
22
+ __rvm_run "$package/extract" "unzip -q -o $rvm_archives_path/$package-$version.$archive_format -d $rvm_src_path/$package-$version" "Extracting $package-$version.$archive_format to $rvm_src_path"
23
+ else
24
+ echo -e "Unrecognized archive format '$archive_format'" ; return 1
25
+ fi
26
+
45
27
  builtin cd "$rvm_src_path/$package-$version"
46
- __rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr" "Configuring $package."
28
+
29
+ __rvm_run "$package/configure" "${configure:-"./configure --prefix=$rvm_usr_path"} $configure_flags" "Configuring $package in $rvm_src_path/$package-$version."
30
+
31
+ unset configure_flags
32
+
47
33
  if [[ "$rvm_uninstall_flag" -eq 1 ]] || [[ "$rvm_remove_flag" -eq 1 ]] ; then
48
- __rvm_run "$package/make.uninstall" "/usr/bin/make uninstall" "uninstalling $package from $rvm_path/usr"
34
+ __rvm_run "$package/make.uninstall" "/usr/bin/make uninstall" "Uninstalling $package from $rvm_usr_path"
49
35
  else
50
- __rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package"
51
- __rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_path/usr"
36
+ __rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package in $rvm_src_path/$package-$version."
37
+ __rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_usr_path"
52
38
  fi
39
+
53
40
  __rvm_pushpop
41
+
42
+ }
43
+
44
+ __rvm_readline_install() {
45
+ package="readline" ; archive_format="tar.gz"
46
+ package_url="ftp://ftp.gnu.org/gnu/readline"
47
+ for version in 5.2 6.0 ; do
48
+ configure_flags="--disable-dependency-tracking --disable-static --enable-shared"
49
+ __rvm_install_package
50
+ done
51
+ }
52
+
53
+ __rvm_iconv_install() {
54
+ package="libiconv" ; version=1.13.1 ; archive_format="tar.gz"
55
+ package_url="http://ftp.gnu.org/pub/gnu/libiconv"
56
+ __rvm_install_package
54
57
  }
55
58
 
56
59
  __rvm_curl_install() {
57
- if [[ ! -z "$rvm_make_flags_flag" ]] ; then __rvm_make_flags ; fi
58
- __rvm_pushpop $rvm_src_path
59
60
  package="curl" ; version=7.19.7 ; archive_format="tar.gz"
60
- $rvm_scripts_path/log "info" "Retrieving $package-$version.$archive_format"
61
- $rvm_scripts_path/fetch "http://curl.haxx.se/download/$package-$version.$archive_format" || (result=$? && return $result)
62
- __rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format"
63
- builtin cd "$rvm_src_path/$package-$version"
64
- __rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr" "Configuring $package."
65
- if [[ "$rvm_uninstall_flag" -eq 1 ]] || [[ "$rvm_remove_flag" -eq 1 ]] ; then
66
- __rvm_run "$package/make.uninstall" "/usr/bin/make uninstall" "uninstalling $package from $rvm_path/usr"
67
- else
68
- __rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package"
69
- __rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_path/usr"
70
- fi
71
- __rvm_pushpop
61
+ package_url="http://curl.haxx.se/download"
62
+ __rvm_install_package
72
63
  }
73
64
 
74
65
  __rvm_openssl_install() {
75
- if [[ ! -z "$rvm_make_flags_flag" ]] ; then __rvm_make_flags ; fi
76
66
  if $rvm_scripts_path/match "$rvm_archflags" "x86_64" ; then
77
- openssl_os="os/compiler darwin64-x86_64-cc"
67
+ export openssl_os="os/compiler darwin64-x86_64-cc"
78
68
  else
79
- openssl_os="os/compiler darwin-i386-cc"
69
+ export openssl_os="os/compiler darwin-i386-cc"
80
70
  fi
81
- __rvm_pushpop $rvm_src_path
82
71
  package="openssl" ; version="0.9.8k" ; archive_format="tar.gz"
83
- $rvm_scripts_path/log "info" "Retrieving $package-$version.$archive_format"
84
- $rvm_scripts_path/fetch "http://www.openssl.org/source/$package-$version.tar.gz" || (result=$? && return $result)
85
- __rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format"
86
- builtin cd "$rvm_src_path/$package-$version"
87
- __rvm_run "$package/config" "./config --prefix=$rvm_path/usr zlib no-asm no-krb5 shared" "Configuring $package."
88
- if [[ "$rvm_uninstall_flag" -eq 1 ]] || [[ "$rvm_remove_flag" -eq 1 ]] ; then
89
- __rvm_run "$package/make.uninstall" "/usr/bin/make uninstall" "uninstalling $package from $rvm_path/usr"
90
- else
91
- __rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package"
92
- __rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_path/usr"
93
- fi
94
- __rvm_pushpop
72
+ package_url="http://www.openssl.org/source"
73
+ configure="./config --prefix=$rvm_usr_path zlib no-asm no-krb5 shared"
74
+ __rvm_install_package
95
75
  }
96
76
 
97
77
  __rvm_zlib_install() {
98
- if [[ ! -z "$rvm_make_flags_flag" ]] ; then __rvm_make_flags ; fi
99
- __rvm_pushpop $rvm_src_path
100
78
  package="zlib" ; version="1.2.3" ; archive_format="tar.gz"
101
- $rvm_scripts_path/log "info" "Retrieving $package-$version.$archive_format"
102
- $rvm_scripts_path/fetch "http://www.zlib.net/$package-$version.tar.gz" || (result=$? && return $result)
103
- __rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format"
104
- builtin cd "$rvm_src_path/$package-$version"
105
- __rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr" "Configuring $package."
106
- if [[ "$rvm_uninstall_flag" -eq 1 ]] || [[ "$rvm_remove_flag" -eq 1 ]] ; then
107
- __rvm_run "$package/make.uninstall" "/usr/bin/make uninstall" "uninstalling $package from $rvm_path/usr"
108
- else
109
- __rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package"
110
- __rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_path/usr"
111
- fi
112
- __rvm_pushpop
79
+ package_url="http://www.zlib.net"
80
+ __rvm_install_package
113
81
  }
114
82
 
115
83
  __rvm_ncurses_install() {
116
- if [[ ! -z "$rvm_make_flags_flag" ]] ; then __rvm_make_flags ; fi
117
- __rvm_pushpop $rvm_src_path
84
+ package_url="ftp://invisible-island.net/ncurses/ncurses"
118
85
  package="ncurses" ; version="5.7" ; archive_format="tar.gz"
119
- $rvm_scripts_path/log "info" "Retrieving $package"
120
- $rvm_scripts_path/fetch "ftp://invisible-island.net/ncurses/ncurses.tar.gz" || (result=$? && return $result)
121
- __rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package.$archive_format -C $rvm_src_path" "Extracting $package.$archive_format"
122
- builtin cd "$rvm_src_path/$package-$version"
123
- __rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr --with-shared --disable-rpath --without-debug --without-ada --enable-safe-sprintf --enable-sigwinch --without-progs" "Configuring $package."
124
- if [[ "$rvm_uninstall_flag" -eq 1 ]] || [[ "$rvm_remove_flag" -eq 1 ]] ; then
125
- __rvm_run "$package/make.uninstall" "/usr/bin/make uninstall" "uninstalling $package from $rvm_path/usr"
126
- else
127
- __rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package"
128
- __rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_path/usr"
129
- fi
130
- __rvm_pushpop
86
+ configure_flags="--with-shared --disable-rpath --without-debug --without-ada --enable-safe-sprintf --enable-sigwinch --without-progs"
87
+ __rvm_install_package
88
+ }
89
+
90
+ __rvm_pkgconfig_install() {
91
+ package_url="http://pkgconfig.freedesktop.org/releases"
92
+ package="pkg-config" ; version="0.23" archive_format="tar.gz"
93
+ __rvm_install_package
94
+ }
95
+
96
+ __rvm_gettext_install() {
97
+ package_url="ftp://ftp.gnu.org/pub/gnu/gettext"
98
+ package="gettext" ; version="0.17" ; archive_format="tar.gz"
99
+ __rvm_install_package
100
+ }
101
+
102
+ __rvm_glib_install() {
103
+ package="glib" ; version="2.23.1" ; archive_format="tar.gz"
104
+ package_url="http://ftp.gnome.org/pub/gnome/sources/glib/2.23"
105
+ configure="CC=\"cc -L$rvm_usr_path/lib\" ./configure --prefix=$rvm_usr_path"
106
+
107
+ __rvm_install_package
131
108
  }
132
109
 
133
- __rvm_install_llvm() {
110
+ __rvm_mono_install() {
111
+ package="mono" ; version="2.6.1" ; archive_format="tar.bz2"
112
+ packge_url="http://ftp.novell.com/pub/mono/sources/mono/"
113
+ __rvm_mono_env
114
+ __rvm_gettext_install
115
+ __rvm_pkgconfig_install
116
+ __rvm_glib_install
117
+ }
118
+
119
+ __rvm_llvm_install() {
134
120
  if [[ ! -z "$rvm_make_flags_flag" ]] ; then __rvm_make_flags ; fi
135
- builtin cd "$rvm_src_path"
121
+ __rvm_pushpop $rvm_src_path
136
122
  if [[ ! -d "$rvm_src_path/llvm/.svn" ]] ; then
137
123
  rm -rf "$rvm_src_path/llvm"
138
124
  svn co -r 89156 https://llvm.org/svn/llvm-project/llvm/trunk llvm
@@ -141,9 +127,5 @@ __rvm_install_llvm() {
141
127
  UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" ENABLE_OPTIMIZED=1 make -j2
142
128
  sudo env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" ENABLE_OPTIMIZED=1 make install
143
129
  fi
130
+ __rvm_pushpop
144
131
  }
145
-
146
- __rvm_install_mono() {
147
- echo "Not implemented yet."
148
- }
149
-
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
- if [[ ! -z "$rvm_trace_flag" ]] ; then set -x ; export rvm_trace_flag ; fi
3
+ if [[ "$rvm_trace_flag" -eq 2 ]] ; then set -x ; export rvm_trace_flag ; fi
4
4
 
5
5
  if [[ ! -z "$2" ]] ; then level=$1 ; shift ; else level="info" ; fi
6
6
 
@@ -69,7 +69,7 @@ __rvm_install_source() {
69
69
 
70
70
  if [[ ! -z "$rvm_ruby_patch" ]] ; then
71
71
  for patch in $(echo $rvm_ruby_patch | tr ',' ' ') ; do
72
- patch -p1 $patch
72
+ patch -p0 -f < $patch
73
73
  done
74
74
  fi
75
75
 
@@ -459,11 +459,6 @@ __rvm_ruby_string() {
459
459
  rvm_ruby_string="${rvm_ruby_string}-${rvm_ruby_revision}"
460
460
  elif [[ ! -z "$rvm_ruby_tag" ]] ; then
461
461
  rvm_ruby_string="${rvm_ruby_string}-${rvm_ruby_tag}"
462
- elif [[ ! -z "$rvm_ruby_patch" ]] ; then
463
- if [[ -z "$rvm_ruby_patch_name" ]] ; then
464
- rvm_ruby_patch_name="$(basename $rvm_ruby_patch | awk -F',' '{print $1}')"
465
- fi
466
- rvm_ruby_string="${rvm_ruby_string}-${rvm_ruby_patch}"
467
462
  elif [[ ! -z "$rvm_ruby_patch_level" ]] ; then
468
463
  rvm_ruby_string="${rvm_ruby_string}-${rvm_ruby_patch_level}"
469
464
  elif [[ ! -z "$rvm_ruby_user_tag" ]] ; then
@@ -150,12 +150,12 @@ __rvm_cleanup_variables() {
150
150
 
151
151
  if [[ "$rvm_sticky_gems" = "1" ]] ; then export rvm_gem_set_name ; else unset rvm_gem_set_name ; fi
152
152
 
153
- 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
153
+ 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 rvm_ruby_patch
154
154
  }
155
155
 
156
156
  # Unset ruby-specific variables
157
157
  __rvm_unset_ruby_variables() {
158
- 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 rvm_ruby_gem_path
158
+ 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_package_file rvm_ruby_package_name rvm_ruby_gem_path
159
159
  }
160
160
 
161
161
  __rvm_load_rvmrc() {
@@ -247,6 +247,7 @@ __rvm_reset() {
247
247
 
248
248
  for file in system default ; do
249
249
  if [[ -f "$rvm_path/$file" ]] ; then rm -f $rvm_path/$file ; fi
250
+ if [[ -f "$rvm_config_path/$file" ]] ; then rm -f $rvm_config_path/$file ; fi
250
251
  done
251
252
  rvm_ruby_interpreter="system"
252
253
  __rvm_select
@@ -327,45 +328,35 @@ __rvm_list() {
327
328
  current_ruby="$(echo $ruby | xargs dirname | xargs dirname | xargs basename 2> /dev/null)"
328
329
  fi
329
330
 
331
+ echo -e "rvm Rubies\n"
330
332
  for version in $(\ls $rvm_rubies_path/ 2> /dev/null | awk '/[a-z]*-.*/ {print $NF}') ; do
331
333
  if [[ ! -z "$(echo $version | awk '/^jruby-/')" ]] ; then
332
334
  string="[ $($rvm_rubies_path/$version/bin/ruby -v | awk '{print $NF}') ]"
333
- elif [[ ! -z "$(echo $version | awk '/^maglev-/')" ]] ; then
335
+ elif [[ ! -z "$(echo $version | awk '/^maglev-|^macruby-/')" ]] ; then
334
336
  string="[ x86_64 ]"
335
337
  else
336
338
  string="[ $(file $rvm_rubies_path/$version/bin/ruby | awk '/x86.64/ {print "x86_64"} /386/ {print "i386"} /ppc/ {print "ppc"}' | tr "\n" ' ')]"
337
339
  fi
338
- if [[ "$version" = "$current_ruby" ]] ; then
339
- echo -e "=> $(tput setaf 2)$version$(tput sgr0) $string"
340
- selected="1"
341
- else
342
- echo -e " $(tput setaf 2)$version$(tput sgr0) $string"
343
- fi
340
+ if [[ "$version" = "$current_ruby" ]] ; then echo -n "=> " ; else echo -n " " ; fi
341
+ echo -e "$(tput setaf 2)$version$(tput sgr0) $string"
344
342
  done ; unset version
345
343
 
346
344
  if [[ -f "$rvm_config_path/default" ]] && [[ -s $rvm_config_path/default ]] ; then
347
345
  version=$(grep 'MY_RUBY_HOME' $rvm_config_path/default | awk -F"'" '{print $2}' | xargs basename)
348
346
  if [[ ! -z "$version" ]] ; then
347
+ echo -e "\nDefault Ruby (for new shells)\n"
349
348
  string="[ $(file $rvm_rubies_path/$version/bin/ruby | awk '/x86.64/ {print "x86_64"} /386/ {print "i386"} /ppc/ {print "ppc"}' | tr "\n" ' ')]"
350
- if [[ "$version" = "$current_ruby" ]] ; then
351
- echo -e "=> $(tput setaf 3)(default)$(tput sgr0) $(tput setaf 2)$version$(tput sgr0) $string"
352
- selected="1"
353
- else
354
- echo -e " $(tput setaf 3)(default)$(tput sgr0) $(tput setaf 2)$version$(tput sgr0) $string"
355
- fi
349
+ echo -e " $(tput setaf 2)$version$(tput sgr0) $string"
356
350
  fi ; unset version
357
351
  fi
358
352
 
359
353
  system_ruby="$(rvm system ; which ruby 2>/dev/null)"
360
354
  if [[ ! -z "$system_ruby" ]] && [[ -x "$system_ruby" ]]; then
361
- #system_version=$($system_ruby -v | awk -F: '{print $2}' | grep 8 | awk '{print $NF}' | tr "\n" ' ')
355
+ echo -e "\nSystem Ruby\n"
362
356
  system_version=$($system_ruby -v)
363
357
  string="[ $(file $system_ruby | awk '/x86.64/ {print "x86_64"} /386/ {print "i386"} /ppc/ {print "ppc"}' | tr "\n" ' ')]"
364
- if [[ ! -z "$system_ruby" ]] && [[ "$system_ruby -v)" = "$system_version" ]] ; then
365
- echo -e "=> $(tput setaf 2)system$(tput sgr0) $string"
366
- else
367
- echo -e " $(tput setaf 2)system$(tput sgr0) $string"
368
- fi
358
+ if [[ ! -z "$system_ruby" ]] && [[ "$current_ruby" = "$system_version" ]] ; then echo -n "=> " ; else echo -n " " ; fi
359
+ echo -e "$(tput setaf 2)system$(tput sgr0) $string"
369
360
  else
370
361
  $rvm_scripts_path/log "info" "No system ruby found."
371
362
  fi
@@ -492,7 +483,6 @@ __rvm_ruby_do() {
492
483
  fi
493
484
  rvm_command="$binary $rvm_ruby_mode $rvm_ruby_require -I$load_path $rvm_ruby_args"
494
485
  elif [[ "gem" = "$(basename $binary)" ]] && $rvm_scripts_path/match "$rvm_ruby_args" '^install' ; then
495
- #__rvm_gem_install
496
486
  #$rvm_scripts_path/gem install $rvm_ruby_args
497
487
  rvm_command="$rvm_scripts_path/gems $rvm_ruby_mode $rvm_ruby_args $rvm_gem_options"
498
488
  else
@@ -802,3 +792,11 @@ __rvm_gems_use() {
802
792
  fi
803
793
  }
804
794
 
795
+ __rvm_mono_env() {
796
+ export DYLD_LIBRARY_PATH="$rvm_usr_path/lib:$DYLD_LIBRARY_PATH"
797
+ export C_INCLUDE_PATH="$rvm_usr_path/include:$C_INCLUDE_PATH"
798
+ export ACLOCAL_PATH="$rvm_usr_path/share/aclocal"
799
+ export ACLOCAL_FLAGS="-I $ACLOCAL_PATH"
800
+ export PKG_CONFIG_PATH="$rvm_usr_path/lib/pkgconfig:$PKG_CONFIG_PATH"
801
+ PATH="$rvm_usr_path/bin:$PATH"
802
+ }
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.11
4
+ version: 0.1.12
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-02-07 00:00:00 -05:00
12
+ date: 2010-02-09 00:00:00 -05:00
13
13
  default_executable: rvm-install
14
14
  dependencies: []
15
15
 
@@ -43,7 +43,6 @@ files:
43
43
  - scripts/cd
44
44
  - scripts/cli
45
45
  - scripts/color
46
- - scripts/completion
47
46
  - scripts/db
48
47
  - scripts/fetch
49
48
  - scripts/functions
@@ -1,174 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- complete -o default -o nospace -F _rvm rvm
4
-
5
- _rvm ()
6
- {
7
- local i c=1 command __git_dir
8
-
9
- while [[ $c -lt $COMP_CWORD ]]; do
10
- i="${COMP_WORDS[[c]]}"
11
- case "$i" in
12
- --git-dir=*) __git_dir="${i#--git-dir=}" ;;
13
- --bare) __git_dir="." ;;
14
- --version|-p|--paginate) ;;
15
- --help) command="help"; break ;;
16
- *) command="$i"; break ;;
17
- esac
18
- c=$((++c))
19
- done
20
-
21
- if [[ -z "$command" ]]; then
22
- case "${COMP_WORDS[[COMP_CWORD]]}" in
23
- --*) __gitcomp "
24
- --paginate
25
- --no-pager
26
- --git-dir=
27
- --bare
28
- --version
29
- --exec-path
30
- --html-path
31
- --work-tree=
32
- --help
33
- "
34
- ;;
35
- *) __gitcomp "$(__git_porcelain_commands) $(__git_aliases)" ;;
36
- esac
37
- return
38
- fi
39
-
40
- local expansion=$(__git_aliased_command "$command")
41
- [[ "$expansion" ]] && command="$expansion"
42
-
43
- case "$command" in
44
- install|uninstall|path|info|setup|version|srcdir|list|reset|debug|reload|usage|help|implode|update|readline|iconv|benchmark|bench|use)
45
- ;;
46
-
47
- rm|remove)
48
- ;;
49
-
50
- system|default)
51
- ;;
52
-
53
- ruby|jruby|ree|macruby|rbx|rubinius|ironruby|default|all)
54
- ;;
55
-
56
- gemdir)
57
- ;;
58
-
59
- 1.8.0|1.8.1|1.8.2|1.8.3|1.8.4|1.8.5|1.8.6|1.8.7|1.9.1|1.9.2)
60
- ;;
61
-
62
- 1.2.0|1.3.1)
63
- ;;
64
-
65
- do|rubydo|rakedo|gemdo)
66
- ;;
67
- specs|tests)
68
- ;;
69
- rake|gem)
70
- ;;
71
- -S|--script|-e|--execute)
72
- ;;
73
- default|system)
74
- ;;
75
-
76
- --install) rvm_install_on_use_flag=1 ;;
77
- -G|--gems) rvm_gems_path="$1" ; shift ;;
78
- --source) rvm_src_path="$1" ; shift ;;
79
- --archives) rvm_archives_path="$1" ; shift ;;
80
- --make) rvm_ruby_make="$1" ; shift ;;
81
- --make-install) rvm_ruby_make_install="$1"; shift ;;
82
- --nice) rvm_niceness="$1" ; shift ;;
83
- -l|--level) rvm_ruby_patch_level="$1" ; shift ;;
84
- -h|--help) rvm_action=help ; shift ;;
85
- tests|specs) rvm_action="tests" ;;
86
-
87
- --self|--gem|--rubygems|--reconfigure|--default|--debug|debug|--force|--all|--dump|--summary|--jit|--latest|--yaml|yaml|--json|json)
88
- eval "rvm_$(echo $rvm_token | sed 's/-//g')_flag=1"
89
- ;;
90
-
91
- stash) _git_stash ;;
92
- stage) _git_add ;;
93
- submodule) _git_submodule ;;
94
- svn) _git_svn ;;
95
- tag) _git_tag ;;
96
- whatchanged) _git_log ;;
97
- *) COMPREPLY=() ;;
98
- esac
99
- }
100
-
101
- # __gitcomp accepts 1, 2, 3, or 4 arguments
102
- # generates completion reply with compgen
103
- function __rvm_completion_reply
104
- {
105
- local cur="${COMP_WORDS[[COMP_CWORD]]}"
106
- if [[ $# -gt 2 ]]; then
107
- cur="$3"
108
- fi
109
- case "$cur" in
110
- --*=)
111
- COMPREPLY=()
112
- ;;
113
- *)
114
- local IFS=$'\n'
115
- COMPREPLY=($(compgen -P "${2-}" \
116
- -W "$(__gitcomp_1 "${1-}" "${4-}")" \
117
- -- "$cur"))
118
- ;;
119
- esac
120
- }
121
-
122
- function _rvm {
123
-
124
- __rvm_cleanup_variables
125
- __rvm_load_rvmrc
126
- __rvm_load_defaults
127
- __rvm_parse_args $@
128
-
129
- result=0
130
- case "$rvm_action" in
131
- install) __rvm_install ; result=$? ;;
132
- uninstall) __rvm_uninstall ; result=$? ;;
133
- remove) __rvm_remove_ruby ; result=$? ;;
134
- use) __rvm_use ; result=$? ;;
135
- gemdir) __rvm_gem-dir ; result=$? ;;
136
- srcdir) __rvm_src-dir ; result=$? ;;
137
- list) __rvm_list ; result=$? ;;
138
- version) __rvm_version ; result=$? ;;
139
- reset) __rvm_reset ; result=$? ;;
140
- # TODO: how can we use bin_path here for reload, default file?
141
- implode) __rvm_implode ; result=$? ;;
142
- update) __rvm_update ; result=$? ;;
143
- readline) __rvm_readline_install ; result=$? ;;
144
- iconv) __rvm_iconv_install ; result=$? ;;
145
- reboot) __rvm_reboot ; result=$? ;;
146
- usage|help) __rvm_usage ; result=$? ;;
147
- bench|benchmark) __rvm_benchmark ; result=$? ;;
148
- rubydo|rakedo|gemdo) __rvm_do ; result=$? ;;
149
-
150
- tests|specs)
151
- rvm_summary_flag=1
152
- ;;
153
-
154
- info|debug)
155
- result=0
156
- ;;
157
-
158
- error)
159
- $rvm_scripts_path/log "fail" "$rvm_error_message ( see: 'rvm usage' )"
160
- __rvm_pushpop
161
- result=1;
162
- ;;
163
- *)
164
- if [[ ! -z "$rvm_action" ]] ; then
165
- $rvm_scripts_path/log "fail" "unknown action '$rvm_action'"
166
- else
167
- __rvm_usage
168
- fi
169
- result=1
170
- esac
171
- return $result
172
- }
173
-
174
-