rvm 1.0.13 → 1.0.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,26 +1,35 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
- rvm_ignore_rvmrc=${rvm_ignore_rvmrc:-0}
4
- if [[ $rvm_ignore_rvmrc -eq 0 ]]; then
5
- [[ -s /etc/rvmrc ]] && source /etc/rvmrc
6
- [[ -s "$HOME/.rvmrc" ]] && source "$HOME/.rvmrc"
3
+ set -o errtrace
4
+ set -o errexit
5
+
6
+ export PS4='+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }'
7
+
8
+ if [[ ${rvm_ignore_rvmrc:-0} -eq 0 ]]; then
9
+ for file in /etc/rvmrc "$HOME/.rvmrc" ; do
10
+ if [[ -s "$file" ]] ; then
11
+ source $file
12
+ fi
13
+ done
7
14
  fi
8
15
 
9
- rvm_path="${rvm_path:-$HOME/.rvm}"
16
+ rvm_path="${rvm_path:-"$HOME/.rvm"}"
10
17
 
11
- [ -d "$rvm_path/src" ] || \mkdir -p $rvm_path/src/
18
+ mkdir -p "$rvm_path/src/"
12
19
 
13
- cd "$rvm_path/src"
20
+ builtin cd "$rvm_path/src"
14
21
 
15
- [ -d ./rvm ] && \rm -rf ./rvm/
22
+ rm -rf ./rvm/
16
23
 
17
- git clone --depth 1 git://github.com/wayneeseguin/rvm.git ||
18
- git clone http://github.com/wayneeseguin/rvm.git
24
+ url="http://github.com/wayneeseguin/rvm.git"
25
+
26
+ if ! git clone "$url" ; then
27
+ printf "ERROR: Cloning from $url failed.\n"
28
+ exit 1
29
+ fi
19
30
 
20
- cd rvm &&
31
+ builtin cd rvm
21
32
 
22
- # v v v This is a good idea however it does not preserve the executible bit.
23
- # Needs more thought, perhaps a simple sed instead...
24
- # dos2unix scripts/* >/dev/null 2>&1
33
+ chmod +x "$PWD/scripts/install"
25
34
 
26
- bash scripts/install
35
+ exec "$PWD/scripts/install"
data/config/db CHANGED
@@ -44,7 +44,7 @@ ree_1.8.7_patch_level=2010.02
44
44
  jruby_version=1.5.3
45
45
  jruby_repo_url=git://github.com/jruby/jruby.git
46
46
  jruby_url=http://jruby.org.s3.amazonaws.com/downloads
47
- macruby_version=0.6
47
+ macruby_version=0.7
48
48
  macruby_url=http://www.macruby.org/files
49
49
  macruby_repo_url=git://git.macruby.org/macruby/MacRuby.git
50
50
  macruby_nightly_url=http://www.macruby.org/files/nightlies/macruby_nightly-latest.pkg
@@ -43,7 +43,9 @@ maglev-head
43
43
  mput[-head]
44
44
 
45
45
  # Mac OS X Snow Leopard Only
46
- macruby[-nightly] # the default macruby
46
+ macruby-0.6
47
+ macruby-[0.7] # the default macruby
48
+ macruby-nightly
47
49
  macruby-head # Build from the macruby git repository
48
50
 
49
51
  # IronRuby -- Not implemented yet.
data/config/md5 CHANGED
@@ -63,6 +63,7 @@ rubygems-1.3.6.tgz=789ca8e9ad1d4d3fe5f0534fcc038a0d
63
63
  rubygems-1.3.7.tgz=e85cfadd025ff6ab689375adbf344bbe
64
64
  MacRuby%200.5.zip=675454a8c7bc19d606d90a726e08427c
65
65
  MacRuby%200.6.zip=a80afd3700c88cf95c539fc63b272faf
66
+ MacRuby%200.7.zip=0bb60588c9ec9b1517665743bb05132f
66
67
  jruby-bin-1.3.1.tar.gz=4a95db8fc93ed7219663fbede98b6117
67
68
  jruby-bin-1.4.0.tar.gz=f37322c18e9134e91e064aebb4baa4c7
68
69
  jruby-bin-1.5.0.RC1.tar.gz=47b4ca2a21659d36a2775ade0a2534c4
data/install CHANGED
@@ -366,8 +366,8 @@ if [[ ${rvm_auto_flag:-0} -eq 1 ]] ; then
366
366
  echo " Adding profile sourcing line to $rcfile."
367
367
 
368
368
  printf "
369
- # rvm-install added line:
370
- [[ -s \$HOME/.profile ]] && source \$HOME/.profile
369
+ # rvm install added line:
370
+ [[ -s \"$rvm_path/.profile\" ]] && source \"$rvm_path/.profile\"
371
371
  " >> "$rcfile"
372
372
 
373
373
  fi
@@ -379,7 +379,7 @@ if [[ ${rvm_auto_flag:-0} -eq 1 ]] ; then
379
379
  echo " Adding rvm loading line to $rcfile."
380
380
 
381
381
  printf "
382
- # rvm-install added:
382
+ # rvm install added:
383
383
  [[ -s \"$rvm_path/.rvm/scripts/rvm\" ]] && . \"$rvm_path/.rvm/scripts/rvm\"
384
384
  " >> "$rcfile"
385
385
 
@@ -403,6 +403,7 @@ if [[ -d gemsets/ ]] ; then
403
403
  for gemset_file in $(find "$PWD/gemsets" -iname '*.gems' | sed 's/^\.\///') ; do
404
404
 
405
405
  cwd="${PWD//\//\\/}\/gemsets\/"
406
+
406
407
  destination="$rvm_path/gemsets/${gemset_file/$cwd}"
407
408
 
408
409
  destination_path="$(dirname "$destination")"
@@ -417,8 +418,6 @@ if [[ -d gemsets/ ]] ; then
417
418
 
418
419
  done
419
420
 
420
- unset destination destination_path gemset_file
421
-
422
421
  fi
423
422
 
424
423
  if [[ -d patchsets/ ]] ; then
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 1
3
3
  :minor: 0
4
- :patch: 13
4
+ :patch: 14
@@ -0,0 +1,385 @@
1
+ '\" t
2
+ .\" Title: rvm
3
+ .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4
+ .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
5
+ .\" Date: 07/16/2010
6
+ .\" Manual: [FIXME: manual]
7
+ .\" Source: [FIXME: source]
8
+ .\" Language: English
9
+ .\"
10
+ .TH "RVM" "1" "07/16/2010" "[FIXME: source]" "[FIXME: manual]"
11
+ .\" -----------------------------------------------------------------
12
+ .\" * set default formatting
13
+ .\" -----------------------------------------------------------------
14
+ .\" disable hyphenation
15
+ .nh
16
+ .\" disable justification (adjust text to left margin only)
17
+ .ad l
18
+ .\" -----------------------------------------------------------------
19
+ .\" * MAIN CONTENT STARTS HERE *
20
+ .\" -----------------------------------------------------------------
21
+ .SH "NAME"
22
+ rvm \- The Ruby Version Manager
23
+ .SH "SYNOPSIS"
24
+ .sp
25
+ \fBrvm\fR [\fIFLAGS\fR] [\fIOPTIONS\fR] \fIACTION\fR [\fIIMPLEMENTATION\fR[,\fIIMPLEMENTATION\fR[,\fI\&...\fR]]
26
+ .SH "DESCRIPTION"
27
+ .sp
28
+ RVM is a command line tool which allows us to easily install, manage and work with multiple ruby environments from interpreters to sets of gems\&.
29
+ .SH "FLAGS"
30
+ .PP
31
+ \fB\-\-head\fR
32
+ .RS 4
33
+ with update, updates rvm to git head version\&.
34
+ .RE
35
+ .PP
36
+ \fB\-\-rubygems\fR
37
+ .RS 4
38
+ with update, updates rubygems for selected ruby
39
+ .RE
40
+ .PP
41
+ \fB\-\-default\fR
42
+ .RS 4
43
+ with ruby select, sets a default ruby for new shells\&.
44
+ .RE
45
+ .PP
46
+ \fB\-\-debug\fR
47
+ .RS 4
48
+ Toggle debug mode on for very verbose output\&.
49
+ .RE
50
+ .PP
51
+ \fB\-\-trace\fR
52
+ .RS 4
53
+ Toggle trace mode on to see EVERYTHING rvm is doing\&.
54
+ .RE
55
+ .PP
56
+ \fB\-\-force\fR
57
+ .RS 4
58
+ Force install, removes old install & source before install\&.
59
+ .RE
60
+ .PP
61
+ \fB\-\-summary\fR
62
+ .RS 4
63
+ Used with rubydo to print out a summary of the commands run\&.
64
+ .RE
65
+ .PP
66
+ \fB\-\-latest\fR
67
+ .RS 4
68
+ with gemset \-\-dump skips version strings for latest gem\&.
69
+ .RE
70
+ .PP
71
+ \fB\-\-gems\fR
72
+ .RS 4
73
+ with uninstall/remove removes gems with the interpreter\&.
74
+ .RE
75
+ .PP
76
+ \fB\-\-docs\fR
77
+ .RS 4
78
+ with install, attempt to generate ri after installation\&.
79
+ .RE
80
+ .PP
81
+ \fB\-\-reconfigure\fR
82
+ .RS 4
83
+ Force \&./configure on install even if Makefile already exists\&.
84
+ .RE
85
+ .SH "OPTIONS"
86
+ .PP
87
+ \fB\-v, \-\-version\fR
88
+ .RS 4
89
+ Emit rvm version loaded for current shell\&.
90
+ .RE
91
+ .PP
92
+ \fB\-l, \-\-level\fR
93
+ .RS 4
94
+ patch level to use with rvm use / install
95
+ .RE
96
+ .PP
97
+ \fB\-\-prefix\fR
98
+ .RS 4
99
+ path for all rvm files (\fI~/\&.rvm/\fR), with trailing slash!
100
+ .RE
101
+ .PP
102
+ \fB\-\-bin\fR
103
+ .RS 4
104
+ path for binaries to be placed (\fI~/\&.rvm/bin/\fR)
105
+ .RE
106
+ .PP
107
+ \fB\-\-source\fR
108
+ .RS 4
109
+ src directory to use (\fI~/\&.rvm/src/\fR)
110
+ .RE
111
+ .PP
112
+ \fB\-\-archives\fR
113
+ .RS 4
114
+ directory for downladed files (\fI~/\&.rvm/archives/\fR)
115
+ .RE
116
+ .PP
117
+ \fB\-S\fR
118
+ .RS 4
119
+ Specify a script file to attempt to load and run (rubydo)\&.
120
+ .RE
121
+ .PP
122
+ \fB\-e\fR
123
+ .RS 4
124
+ Execute code from the command line\&.
125
+ .RE
126
+ .PP
127
+ \fB\-G\fR
128
+ .RS 4
129
+ root gem path to use
130
+ .RE
131
+ .PP
132
+ \fB\-\-gems\fR
133
+ .RS 4
134
+ Used to set the
135
+ \fIgems_flag\fR, use with
136
+ \fIremove\fR
137
+ to remove gems\&.
138
+ .RE
139
+ .PP
140
+ \fB\-\-archive\fR
141
+ .RS 4
142
+ Used to set the
143
+ \fIarchive_flag\fR, use with
144
+ \fIremove\fR
145
+ to remove archive\&.
146
+ .RE
147
+ .PP
148
+ \fB\-\-patch\fR, \fB\-\-patches\fR
149
+ .RS 4
150
+ With any ruby build from source, allows you to specify patch paths and patch names to be applied prior to building\&. Values should be a relative / absolute path to a patch or the name of known patch / patchset\&. Optionally, paths or names may be followed by
151
+ \fI%someinteger\fR
152
+ \- e\&.g\&.
153
+ \fI\-\-patches mypatch%2\fR
154
+ \- where the number following the % specifies the value of the \-p argument to patch, defaulting to two\&.
155
+ .RE
156
+ .PP
157
+ \fB\-C, \-\-configure\fR
158
+ .RS 4
159
+ custom configure options\&. If you need to pass several configure options then append them comma separated:
160
+ \fI\-C \-\-\&...,\-\-\&...,\-\-\&...\fR\&.
161
+ .RE
162
+ .PP
163
+ \fB\-\-nice\fR
164
+ .RS 4
165
+ process niceness (for slow computers, default 0)
166
+ .RE
167
+ .PP
168
+ \fB\-\-ree\-options\fR
169
+ .RS 4
170
+ Options passed directly to ree\(cqs
171
+ \fI\&./installer\fR
172
+ on the command line\&.
173
+ .RE
174
+ .SH "ACTIONS"
175
+ .PP
176
+ \fBusage\fR
177
+ .RS 4
178
+ Show this usage information\&.
179
+ .RE
180
+ .PP
181
+ \fBversion\fR
182
+ .RS 4
183
+ Show the rvm version installed in rvm_path\&.
184
+ .RE
185
+ .PP
186
+ \fBuse\fR
187
+ .RS 4
188
+ Setup current shell to use a specific ruby version\&.
189
+ .RE
190
+ .PP
191
+ \fBreload\fR
192
+ .RS 4
193
+ Reload rvm source itself (useful after changing rvm source)\&.
194
+ .RE
195
+ .PP
196
+ \fBenv\fR
197
+ .RS 4
198
+ Displays information about an environment specified but the given ruby string\&. Useful for getting a sourceable path or an evaluatable set of shell variable declarations\&.
199
+ .RE
200
+ .PP
201
+ \fBimplode\fR
202
+ .RS 4
203
+ (seppuku) removes the rvm installation completely\&. This means everything in $rvm_path (\fI~/\&.rvm\fR)\&. This does not touch your profiles, which is why there is an if around the sourcing
204
+ \fIscripts/rvm\fR\&.
205
+ .RE
206
+ .PP
207
+ \fBupdate\fR
208
+ .RS 4
209
+ Upgrades rvm to the latest version\&. (If you experience bugs try this first with \-\-head)\&.
210
+ .RE
211
+ .PP
212
+ \fBreset\fR
213
+ .RS 4
214
+ Remove current and stored default & system settings\&. (If you experience odd behavior try this second)\&.
215
+ .RE
216
+ .PP
217
+ \fBinfo\fR
218
+ .RS 4
219
+ Show the
220
+ \fBcurrent\fR
221
+ environment information for current ruby\&.
222
+ .RE
223
+ .PP
224
+ \fBdebug\fR
225
+ .RS 4
226
+ Show info plus additional information for common issues\&.
227
+ .RE
228
+ .PP
229
+ \fBinstall\fR
230
+ .RS 4
231
+ Install one or many ruby versions\&.
232
+ http://rvm\&.beginrescueend\&.com/rubies/installing/
233
+ .RE
234
+ .PP
235
+ \fBuninstall\fR
236
+ .RS 4
237
+ Uninstall one or many ruby versions, leaves their sources\&.
238
+ .RE
239
+ .PP
240
+ \fBremove\fR
241
+ .RS 4
242
+ Uninstall one or many ruby versions and remove their sources\&.
243
+ .RE
244
+ .PP
245
+ \fBwrapper\fR
246
+ .RS 4
247
+ Generates a set of wrapper executables for a given ruby with the specified ruby and gemset combination\&. Used under the hood for passenger support and the like\&.
248
+ .RE
249
+ .PP
250
+ \fBruby\fR
251
+ .RS 4
252
+ Runs a named ruby file against specified and/or all rubies\&.
253
+ .RE
254
+ .PP
255
+ \fBgem\fR
256
+ .RS 4
257
+ Runs a gem command using selected ruby\(cqs
258
+ \fIgem\fR\&.
259
+ .RE
260
+ .PP
261
+ \fBrake\fR
262
+ .RS 4
263
+ Runs a rake task against specified and/or all rubies\&.
264
+ .RE
265
+ .PP
266
+ \fBtests\fR
267
+ .RS 4
268
+ Runs
269
+ \fIrake test\fR
270
+ across selected ruby versions\&.
271
+ .RE
272
+ .PP
273
+ \fBspecs\fR
274
+ .RS 4
275
+ Runs
276
+ \fIrake spec\fR
277
+ across selected ruby versions\&.
278
+ .RE
279
+ .PP
280
+ \fBmonitor\fR
281
+ .RS 4
282
+ Monitor cwd for testing, run
283
+ \fIrake {spec,test}\fR
284
+ on changes\&.
285
+ .RE
286
+ .PP
287
+ \fBgemset\fR
288
+ .RS 4
289
+ gemsets:
290
+ http://rvm\&.beginrescueend\&.com/gemsets/
291
+ .RE
292
+ .PP
293
+ \fBgemdir\fR
294
+ .RS 4
295
+ Display the path to the current gem directory (\fI$GEM_HOME\fR)\&.
296
+ .RE
297
+ .PP
298
+ \fBsrcdir\fR
299
+ .RS 4
300
+ Display the path to rvm source directory (may be yanked)\&.
301
+ .RE
302
+ .PP
303
+ \fBfetch\fR
304
+ .RS 4
305
+ Performs an archive / src fetch only of the selected ruby\&.
306
+ .RE
307
+ .PP
308
+ \fBlist\fR
309
+ .RS 4
310
+ Show currently installed rubies, interactive output\&.
311
+ http://rvm\&.beginrescueend\&.com/rubies/list/
312
+ .RE
313
+ .PP
314
+ \fBpackage\fR
315
+ .RS 4
316
+ Install a dependency package {readline,iconv,zlib,openssl}\&.
317
+ http://rvm\&.beginrescueend\&.com/packages/
318
+ .RE
319
+ .PP
320
+ \fBnotes\fR
321
+ .RS 4
322
+ Display notes, with operating system specifics\&.
323
+ .RE
324
+ .SH "IMPLEMENTATION"
325
+ .PP
326
+ \fBruby\fR
327
+ .RS 4
328
+ MRI/YARV Ruby (The Gold Standard) {1\&.8\&.6,1\&.8\&.7,1\&.9\&.1,1\&.9\&.2\&...}
329
+ .RE
330
+ .PP
331
+ \fBjruby\fR
332
+ .RS 4
333
+ JRuby, Ruby interpreter on the Java Virtual Machine\&.
334
+ .RE
335
+ .PP
336
+ \fBrbx\fR
337
+ .RS 4
338
+ Rubinius
339
+ .RE
340
+ .PP
341
+ \fBree\fR
342
+ .RS 4
343
+ Ruby Enterprise Edition, MRI Ruby with several custom patches for performance, stability, and memory\&.
344
+ .RE
345
+ .PP
346
+ \fBmacruby\fR
347
+ .RS 4
348
+ MacRuby, insanely fast, can make real apps (Mac OS X Only)\&.
349
+ .RE
350
+ .PP
351
+ \fBmaglev\fR
352
+ .RS 4
353
+ GemStone Ruby, awesome persistent ruby object store\&.
354
+ .RE
355
+ .PP
356
+ \fBironruby\fR
357
+ .RS 4
358
+ IronRuby, NOT supported yet\&. Looking for volunteers to help\&.
359
+ .RE
360
+ .PP
361
+ \fBmput\fR
362
+ .RS 4
363
+ shyouhei(mput)\'s github repository, popular in Japan :)
364
+ .RE
365
+ .PP
366
+ \fBsystem\fR
367
+ .RS 4
368
+ Use the system ruby (eg\&. pre\-rvm state)\&.
369
+ .RE
370
+ .PP
371
+ \fBdefault\fR
372
+ .RS 4
373
+ Use rvm set default ruby and system if it hasn\(cqt been set\&.
374
+ http://rvm\&.beginrescueend\&.com/rubies/default/
375
+ .RE
376
+ .SH "RESOURCES"
377
+ .sp
378
+ Main web site
379
+ .sp
380
+ Online issue\-tracker
381
+ .SH "COPYING"
382
+ .sp
383
+ Copyright (c) 2009 Wayne E\&. Seguin
384
+ .sp
385
+ See LICENCE file for details\&.
Binary file
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rvm}
8
- s.version = "1.0.13"
8
+ s.version = "1.0.14"
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-10-03}
12
+ s.date = %q{2010-10-05}
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}
@@ -99,6 +99,8 @@ Gem::Specification.new do |s|
99
99
  "lib/rvm/shell/single_shot_wrapper.rb",
100
100
  "lib/rvm/shell/utility.rb",
101
101
  "lib/rvm/version.rb",
102
+ "man/man1/rvm.1",
103
+ "man/man1/rvm.1.gz",
102
104
  "rvm.gemspec",
103
105
  "scripts/alias",
104
106
  "scripts/aliases",
@@ -83,7 +83,7 @@ if [[ ${rvm_debug_flag:-0} -gt 0 ]] ; then
83
83
  fi
84
84
 
85
85
  # Check first if we have the correct archive
86
- archive_md5="$($rvm_path/scripts/db "$rvm_path/config/md5" "$archive" | head -n1)"
86
+ archive_md5="$("$rvm_path/scripts/db" "$rvm_path/config/md5" "$archive" | head -n1)"
87
87
 
88
88
  if [[ -e "$archive" && ! -z "$archive_md5" ]] ; then
89
89
 
@@ -104,7 +104,7 @@ $(__rvm_version)
104
104
  $("$rvm_path/scripts/info" "$rvm_ruby_string" "" )
105
105
  PATH:\n$(printf "$PATH" | awk -F":" '{print $1":"$2":"$3":"$4":"$5}' )
106
106
  uname -a: $(uname -a)
107
- permissions: $(\ls -la $rvm_path{,/rubies})
107
+ permissions: $(\ls -la "$rvm_path" "$rvm_path/rubies")
108
108
  "
109
109
 
110
110
  if [[ "Darwin" = "$(uname)" ]] ; then
@@ -123,7 +123,7 @@ $(__rvm_version)
123
123
 
124
124
  if [[ -s "$file_name" ]] ; then
125
125
 
126
- rvm_info="$rvm_info\n$file_name:\n$(\grep 'rvm' $file_name 2>/dev/null || true)"
126
+ rvm_info="$rvm_info\n$file_name:\n$(\grep 'rvm' "$file_name" 2>/dev/null || true)"
127
127
 
128
128
  fi
129
129
 
@@ -131,19 +131,19 @@ $(__rvm_version)
131
131
 
132
132
  if [[ "$rvm_selfcontained" = "0" ]] ; then
133
133
 
134
- debug_files="$rvm_path/config/alias $rvm_path/config/system $rvm_path/config/db /etc/rvmrc /etc/gemrc"
134
+ debug_files=("$rvm_path/config/alias" "$rvm_path/config/system" "$rvm_path/config/db" "/etc/rvmrc" "/etc/gemrc")
135
135
 
136
136
  else
137
137
 
138
- debug_files="$rvm_path/config/alias $rvm_path/config/system $rvm_path/config/db $HOME/.rvmrc $HOME/.gemrc"
138
+ debug_files=("$rvm_path/config/alias" "$rvm_path/config/system" "$rvm_path/config/db" "$HOME/.rvmrc" "$HOME/.gemrc")
139
139
 
140
140
  fi
141
141
 
142
- for file_name in $(echo $debug_files); do
142
+ for file_name in "${debug_files[@]}" ; do
143
143
 
144
- if [[ -f "$file_name" ]] && [[ -s "$file_name" ]] ; then
144
+ if [[ -f "$file_name" && -s "$file_name" ]] ; then
145
145
 
146
- rvm_info="$rvm_info\n$file_name \(filtered\):\n$(awk '!/assword|_key/' < $file_name)\n"
146
+ rvm_info="$rvm_info\n$file_name \(filtered\):\n$(awk '!/assword|_key/' "$file_name" )\n"
147
147
 
148
148
  fi
149
149
 
@@ -366,8 +366,8 @@ if [[ ${rvm_auto_flag:-0} -eq 1 ]] ; then
366
366
  echo " Adding profile sourcing line to $rcfile."
367
367
 
368
368
  printf "
369
- # rvm-install added line:
370
- [[ -s \$HOME/.profile ]] && source \$HOME/.profile
369
+ # rvm install added line:
370
+ [[ -s \"$rvm_path/.profile\" ]] && source \"$rvm_path/.profile\"
371
371
  " >> "$rcfile"
372
372
 
373
373
  fi
@@ -379,7 +379,7 @@ if [[ ${rvm_auto_flag:-0} -eq 1 ]] ; then
379
379
  echo " Adding rvm loading line to $rcfile."
380
380
 
381
381
  printf "
382
- # rvm-install added:
382
+ # rvm install added:
383
383
  [[ -s \"$rvm_path/.rvm/scripts/rvm\" ]] && . \"$rvm_path/.rvm/scripts/rvm\"
384
384
  " >> "$rcfile"
385
385
 
@@ -403,6 +403,7 @@ if [[ -d gemsets/ ]] ; then
403
403
  for gemset_file in $(find "$PWD/gemsets" -iname '*.gems' | sed 's/^\.\///') ; do
404
404
 
405
405
  cwd="${PWD//\//\\/}\/gemsets\/"
406
+
406
407
  destination="$rvm_path/gemsets/${gemset_file/$cwd}"
407
408
 
408
409
  destination_path="$(dirname "$destination")"
@@ -417,8 +418,6 @@ if [[ -d gemsets/ ]] ; then
417
418
 
418
419
  done
419
420
 
420
- unset destination destination_path gemset_file
421
-
422
421
  fi
423
422
 
424
423
  if [[ -d patchsets/ ]] ; then
@@ -364,9 +364,12 @@ __rvm_install_ruby()
364
364
 
365
365
  mkdir -p ${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string
366
366
 
367
- unzip -o -j "${rvm_archives_path:-"$rvm_path/archives"}/$rvm_ruby_package_file" "MacRuby ${rvm_ruby_version}/MacRuby ${rvm_ruby_version}.pkg" -d "${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string"
367
+ unzip -o -j "${rvm_archives_path:-"$rvm_path/archives"}/$rvm_ruby_package_file" \
368
+ "MacRuby ${rvm_ruby_version}/MacRuby ${rvm_ruby_version}.pkg" \
369
+ -d "${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string"
368
370
 
369
- mv "${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string/MacRuby ${rvm_ruby_version}.pkg" "${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string/$rvm_ruby_string.pkg"
371
+ mv "${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string/MacRuby ${rvm_ruby_version}.pkg" \
372
+ "${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string/$rvm_ruby_string.pkg"
370
373
 
371
374
  __rvm_run "macruby/extract" \
372
375
  "sudo /usr/sbin/installer -pkg '${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string/$rvm_ruby_string.pkg' -target '/'"
@@ -1482,7 +1485,8 @@ __rvm_fetch_ruby()
1482
1485
 
1483
1486
  rm -rf "${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string"
1484
1487
 
1485
- cp -R "${rvm_repos_path:-"$rvm_path/repos"}/$rvm_ruby_string" "${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string"
1488
+ cp -R "${rvm_repos_path:-"$rvm_path/repos"}/$rvm_ruby_string" \
1489
+ "${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string"
1486
1490
  fi
1487
1491
 
1488
1492
  return ${result:-0}
@@ -1492,13 +1496,17 @@ __rvm_check_default()
1492
1496
  {
1493
1497
  local default_ruby_interpreter current_ruby_interpreter
1494
1498
 
1495
- default_ruby_interpreter="$(rvm alias show default 2>/dev/null | awk -F"${rvm_gemset_separator:-"@"}" '{print $1}')"
1499
+ default_ruby_interpreter="$(rvm alias show default 2>/dev/null \
1500
+ | awk -F"${rvm_gemset_separator:-"@"}" '{print $1}')"
1496
1501
 
1497
- current_ruby_interpreter="$(echo "$rvm_ruby_string" | awk -F"${rvm_gemset_separator:-"@"}" '{print $1}')"
1502
+ current_ruby_interpreter="$(echo "$rvm_ruby_string" \
1503
+ | awk -F"${rvm_gemset_separator:-"@"}" '{print $1}')"
1498
1504
 
1499
- if [[ -n "$current_ruby_interpreter" && "$current_ruby_interpreter" = "$default_ruby_interpreter" ]]; then
1505
+ if [[ -n "$current_ruby_interpreter" \
1506
+ && "$current_ruby_interpreter" = "$default_ruby_interpreter" ]]; then
1500
1507
 
1501
- __rvm_run_with_env 'default.restore' 'system' 'rvm use system --default' 'Removing default ruby interpreter'
1508
+ __rvm_run_with_env 'default.restore' 'system' \
1509
+ 'rvm use system --default' 'Removing default ruby interpreter'
1502
1510
 
1503
1511
  fi
1504
1512
 
@@ -1572,7 +1580,8 @@ __rvm_remove_ruby()
1572
1580
 
1573
1581
  else
1574
1582
 
1575
- "$rvm_path/scripts/log" "info" "it seems that $dir/$rvm_ruby_string is already non existent."
1583
+ "$rvm_path/scripts/log" "info" \
1584
+ "it seems that $dir/$rvm_ruby_string is already non existent."
1576
1585
 
1577
1586
  fi
1578
1587
 
@@ -1616,7 +1625,8 @@ __rvm_remove_gemsets()
1616
1625
 
1617
1626
  "$rvm_path/scripts/log" "info" "Removing $rvm_ruby_string gemsets..."
1618
1627
 
1619
- gemsets=($(builtin cd "${rvm_gems_path:-"$rvm_path/gems"}"/ ; find . -maxdepth 1 -mindepth 1 -type d))
1628
+ gemsets=($(builtin cd "${rvm_gems_path:-"$rvm_path/gems"}"/ ; \
1629
+ find . -maxdepth 1 -mindepth 1 -type d))
1620
1630
 
1621
1631
  for gemset in "${gemsets[@]//.\/}" ; do
1622
1632
 
@@ -1726,9 +1736,11 @@ __rvm_post_install()
1726
1736
 
1727
1737
  for binary in "${binaries[@]}" ; do
1728
1738
 
1729
- if [[ -e "$rvm_ruby_home/bin/$binary" || -e "${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string/bin/$binary" ]] ; then
1739
+ if [[ -e "$rvm_ruby_home/bin/$binary" \
1740
+ || -e "${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string/bin/$binary" ]] ; then
1730
1741
 
1731
- if [[ "${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string" != "$rvm_ruby_home" && -f "${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string/bin/$binary" ]] ; then
1742
+ if [[ "${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string" != "$rvm_ruby_home" \
1743
+ && -f "${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string/bin/$binary" ]] ; then
1732
1744
 
1733
1745
  cp -f "${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string/bin/$binary" "$rvm_ruby_home/bin/$binary"
1734
1746
 
@@ -60,8 +60,17 @@ install_package()
60
60
 
61
61
  builtin cd "$src_path/$package-$version"
62
62
 
63
+ if [[ ! -z "$patches" ]] ; then
64
+ for patch in $(echo $patches | tr ',' ' ') ; do
65
+ __rvm_run "$package/patch" "patch -p0 -f < $patch" "Applying patch '$patch'..."
66
+ if [[ $? -gt 0 ]] ; then
67
+ $rvm_scripts_path/log "error" "Patch $patch did not apply cleanly... back to the patching board :(" ; exit 1
68
+ fi
69
+ done
70
+ fi
71
+
63
72
  __rvm_run "$package/configure" \
64
- "${configure:-"./configure --prefix=${prefix_path:-"$usr_path"}"} $configure_flags" \
73
+ "${configure:-"./configure --prefix=\"${prefix_path:-"$usr_path"}\""} $configure_flags" \
65
74
  "Configuring $package in $src_path/$package-$version."
66
75
 
67
76
  unset configure_flags
@@ -96,10 +105,15 @@ install_package()
96
105
  readline()
97
106
  {
98
107
  package="readline" ; archive_format="tar.gz"
99
- for version in 5.2 6.0 ; do
100
- configure_flags="--disable-dependency-tracking --disable-static --enable-shared"
101
- install_package
102
- done
108
+ configure="env CFLAGS=-I${usr_path}/include LDFLAGS=-L${usr_path}/lib ./configure --prefix=${usr_path} --disable-dependency-tracking --disable-static --enable-shared"
109
+
110
+ version="5.2"
111
+ patches="$rvm_path/patches/$package-$version/shobj-conf.patch"
112
+ install_package
113
+
114
+ version="6.0"
115
+ patches=""
116
+ install_package
103
117
  }
104
118
 
105
119
  iconv()
@@ -150,7 +164,7 @@ openssl()
150
164
  fi
151
165
  configure_command="./Configure"
152
166
 
153
- patches="$rvm_path/patches/$package/Makefile.org.patch,$rvm_patch/patches/$package/crypto-Makefile.patch"
167
+ patches="$rvm_path/patches/$package/Makefile.org.patch,$rvm_path/patches/$package/crypto-Makefile.patch"
154
168
 
155
169
  # Don't use -j option for make OpenSSL
156
170
  if [[ ! -z "$rvm_make_flags" ]] ; then
@@ -210,7 +224,7 @@ glib()
210
224
  pkgconfig
211
225
  gettext
212
226
  package="glib" ; version="2.23.1" ; archive_format="tar.gz"
213
- configure="CC=\"cc -L$usr_path/lib -I$usr_path/include\" PKG_CONFIG=\"$usr_path/bin/pkg-config\" ./configure --prefix=$usr_path"
227
+ configure="CC=\"cc -L$usr_path/lib -I$usr_path/include\" PKG_CONFIG=\"$usr_path/bin/pkg-config\" ./configure --prefix=\"$usr_path\""
214
228
 
215
229
  install_package
216
230
  }
@@ -242,6 +256,11 @@ llvm()
242
256
  )
243
257
  }
244
258
 
259
+ reset()
260
+ {
261
+ unset package version archive_format patches prefix_path configure configure_flags
262
+ }
263
+
245
264
  # Tools to make managing ruby dependencies inside of rvm easier.
246
265
  args=($*)
247
266
  action="${args[0]:-""}"
@@ -258,6 +277,12 @@ if [[ -n "$library" ]] ; then
258
277
  readline|iconv|curl|openssl|zlib|autoconf|ncurses|pkgconfig|gettext|glib|mono|llvm|libxml2)
259
278
  ${library}
260
279
  ;;
280
+ ree_dependencies)
281
+ for i in zlib ncurses readline openssl iconv; do
282
+ ${i}
283
+ reset
284
+ done
285
+ ;;
261
286
  *)
262
287
  "$rvm_path/scripts/log" "error" "Package '${library}' is unknown."
263
288
  ;;
@@ -268,5 +293,9 @@ if [[ -n "$library" ]] ; then
268
293
  else
269
294
  "$rvm_path/scripts/log" "info" \
270
295
  "Usage: 'rvm package {install,uninstall} {readline,iconv,curl,openssl,zlib,autoconf,ncurses,pkgconfig,gettext,glib,mono,llvm,libxml2}'"
296
+ "$rvm_path/scripts/log" "info" \
297
+ " 'ree_dependencies' installs zlib, ncurses, readline, openssl and iconv in this order."
298
+ "$rvm_path/scripts/log" "info" \
299
+ " still need to add '-C --with-readline-dir=\$rvm_path/usr,--with-iconv-dir=\$rvm_path/usr,--with-zlib-dir=\$rvm_path/usr,--with-openssl-dir=\$rvm_path/usr' to 'rvm install ree'"
271
300
  exit 1
272
301
  fi
@@ -144,7 +144,7 @@ repair_archives()
144
144
 
145
145
  [[ -f "${rvm_archives_path:-"$rvm_path/archives"}/$archive_file" ]] || continue
146
146
 
147
- stored_md5sum="$($rvm_path/scripts/db "$rvm_path/config/md5" "$archive_file" | head -n1)"
147
+ stored_md5sum="$("$rvm_path/scripts/db" "$rvm_path/config/md5" "$archive_file" | head -n1)"
148
148
 
149
149
  if [[ -n "$stored_md5sum" ]] ; then
150
150
 
@@ -366,8 +366,8 @@ if [[ ${rvm_auto_flag:-0} -eq 1 ]] ; then
366
366
  echo " Adding profile sourcing line to $rcfile."
367
367
 
368
368
  printf "
369
- # rvm-install added line:
370
- [[ -s \$HOME/.profile ]] && source \$HOME/.profile
369
+ # rvm install added line:
370
+ [[ -s \"$rvm_path/.profile\" ]] && source \"$rvm_path/.profile\"
371
371
  " >> "$rcfile"
372
372
 
373
373
  fi
@@ -379,7 +379,7 @@ if [[ ${rvm_auto_flag:-0} -eq 1 ]] ; then
379
379
  echo " Adding rvm loading line to $rcfile."
380
380
 
381
381
  printf "
382
- # rvm-install added:
382
+ # rvm install added:
383
383
  [[ -s \"$rvm_path/.rvm/scripts/rvm\" ]] && . \"$rvm_path/.rvm/scripts/rvm\"
384
384
  " >> "$rcfile"
385
385
 
@@ -403,6 +403,7 @@ if [[ -d gemsets/ ]] ; then
403
403
  for gemset_file in $(find "$PWD/gemsets" -iname '*.gems' | sed 's/^\.\///') ; do
404
404
 
405
405
  cwd="${PWD//\//\\/}\/gemsets\/"
406
+
406
407
  destination="$rvm_path/gemsets/${gemset_file/$cwd}"
407
408
 
408
409
  destination_path="$(dirname "$destination")"
@@ -417,8 +418,6 @@ if [[ -d gemsets/ ]] ; then
417
418
 
418
419
  done
419
420
 
420
- unset destination destination_path gemset_file
421
-
422
421
  fi
423
422
 
424
423
  if [[ -d patchsets/ ]] ; then
@@ -269,12 +269,13 @@ __rvm_use()
269
269
 
270
270
  new_path="$(__rvm_remove_rvm_from_path ; printf "$PATH"):${rvm_bin_path:-"$rvm_path/bin"}"
271
271
 
272
- if [[ -s $rvm_path/config/system ]] ; then
272
+ if [[ -s "$rvm_path/config/system" ]] ; then
273
273
 
274
274
  \grep "MY_RUBY_HOME='$rvm_path/rubies" "$rvm_path/config/system" > /dev/null
275
275
 
276
276
  if [[ $? -eq 0 ]] ; then
277
- [[ -f "$rvm_path/config/system" ]] && \rm -f $rvm_path/config/system # 'system' should *not* point to an rvm ruby.
277
+ # 'system' should *not* point to an rvm ruby.
278
+ [[ -f "$rvm_path/config/system" ]] && \rm -f "$rvm_path/config/system"
278
279
  else
279
280
  source "$rvm_path/config/system"
280
281
  fi
@@ -366,8 +366,8 @@ if [[ ${rvm_auto_flag:-0} -eq 1 ]] ; then
366
366
  echo " Adding profile sourcing line to $rcfile."
367
367
 
368
368
  printf "
369
- # rvm-install added line:
370
- [[ -s \$HOME/.profile ]] && source \$HOME/.profile
369
+ # rvm install added line:
370
+ [[ -s \"$rvm_path/.profile\" ]] && source \"$rvm_path/.profile\"
371
371
  " >> "$rcfile"
372
372
 
373
373
  fi
@@ -379,7 +379,7 @@ if [[ ${rvm_auto_flag:-0} -eq 1 ]] ; then
379
379
  echo " Adding rvm loading line to $rcfile."
380
380
 
381
381
  printf "
382
- # rvm-install added:
382
+ # rvm install added:
383
383
  [[ -s \"$rvm_path/.rvm/scripts/rvm\" ]] && . \"$rvm_path/.rvm/scripts/rvm\"
384
384
  " >> "$rcfile"
385
385
 
@@ -403,6 +403,7 @@ if [[ -d gemsets/ ]] ; then
403
403
  for gemset_file in $(find "$PWD/gemsets" -iname '*.gems' | sed 's/^\.\///') ; do
404
404
 
405
405
  cwd="${PWD//\//\\/}\/gemsets\/"
406
+
406
407
  destination="$rvm_path/gemsets/${gemset_file/$cwd}"
407
408
 
408
409
  destination_path="$(dirname "$destination")"
@@ -417,8 +418,6 @@ if [[ -d gemsets/ ]] ; then
417
418
 
418
419
  done
419
420
 
420
- unset destination destination_path gemset_file
421
-
422
421
  fi
423
422
 
424
423
  if [[ -d patchsets/ ]] ; then
@@ -48,7 +48,7 @@ __rvm_teardown()
48
48
 
49
49
  fi
50
50
 
51
- unset rvm_ruby_strings rvm_head_flag rvm_prior_cc next_token rvm_bin_path rvm_error_message rvm_gems_cache_path rvm_gems_path rvm_gemset_name rvm_interactive_flag rvm_man_path rvm_parse_break rvm_rc_files rvm_ruby_binary rvm_ruby_gem_home rvm_ruby_gem_path rvm_ruby_home rvm_ruby_interpreter rvm_ruby_irbrc rvm_ruby_log_path rvm_ruby_major_version rvm_ruby_minor_version rvm_ruby_package_name rvm_ruby_patch_level rvm_ruby_release_version rvm_ruby_repo_url rvm_ruby_revision rvm_ruby_selected_flag rvm_ruby_tag rvm_ruby_version rvm_selfcontained rvm_token rvm_ruby_load_path rvm_path_flag rvm_ruby_require rvm_project_rvmrc_default rvm_action
51
+ unset rvm_ruby_strings rvm_head_flag rvm_prior_cc next_token rvm_bin_path rvm_error_message rvm_gems_cache_path rvm_gems_path rvm_gemset_name rvm_interactive_flag rvm_man_path rvm_parse_break rvm_rc_files rvm_ruby_binary rvm_ruby_gem_home rvm_ruby_gem_path rvm_ruby_home rvm_ruby_interpreter rvm_ruby_irbrc rvm_ruby_log_path rvm_ruby_major_version rvm_ruby_minor_version rvm_ruby_package_name rvm_ruby_patch_level rvm_ruby_release_version rvm_ruby_repo_url rvm_ruby_revision rvm_ruby_selected_flag rvm_ruby_tag rvm_ruby_version rvm_selfcontained rvm_token rvm_ruby_load_path rvm_path_flag rvm_ruby_require rvm_action
52
52
 
53
53
  [[ ${rvm_dump_environment_flag:-0} -eq 1 ]] && __rvm_dump_environment
54
54
 
@@ -117,11 +117,11 @@ __rvm_db()
117
117
  variable=${2:-""}
118
118
 
119
119
  if [[ -f "$rvm_path/config/user" ]] ; then
120
- value="$($rvm_path/scripts/db "$rvm_path/config/user" "$key")"
120
+ value="$("$rvm_path/scripts/db" "$rvm_path/config/user" "$key")"
121
121
  fi
122
122
 
123
123
  if [[ -z "$value" ]] ; then
124
- value="$($rvm_path/scripts/db "$rvm_path/config/db" "$key")"
124
+ value="$("$rvm_path/scripts/db" "$rvm_path/config/db" "$key")"
125
125
  fi
126
126
 
127
127
  if [[ -n "$value" ]] ; then
@@ -814,8 +814,8 @@ __rvm_update_rvm()
814
814
  else
815
815
 
816
816
  builtin cd "${rvm_src_path:-"$rvm_path/src"}" && \
817
- ( git clone --depth 1 git://github.com/wayneeseguin/rvm.git || \
818
- git clone http://github.com/wayneeseguin/rvm.git ) && \
817
+ ( git clone http://github.com/wayneeseguin/rvm.git || \
818
+ git clone --depth 1 git://github.com/wayneeseguin/rvm.git ) && \
819
819
  builtin cd rvm/ && ./scripts/install
820
820
  fi
821
821
  else
@@ -1420,7 +1420,7 @@ __rvm_record_install()
1420
1420
 
1421
1421
  [[ -z "$1" ]] && return
1422
1422
 
1423
- recorded_ruby_name="$($rvm_path/scripts/tools strings "$1")"
1423
+ recorded_ruby_name="$("$rvm_path/scripts/tools" strings "$1")"
1424
1424
 
1425
1425
  rvm_install_record_file="$rvm_path/config/installs"
1426
1426
 
@@ -1446,7 +1446,7 @@ __rvm_remove_install_record()
1446
1446
  {
1447
1447
  local recorded_ruby_name rvm_install_record_file
1448
1448
 
1449
- recorded_ruby_name="$($rvm_path/scripts/tools strings "$1")"
1449
+ recorded_ruby_name="$("$rvm_path/scripts/tools" strings "$1")"
1450
1450
 
1451
1451
  rvm_install_record_file="$rvm_path/config/installs"
1452
1452
 
@@ -1467,7 +1467,7 @@ __rvm_recorded_install_command()
1467
1467
  {
1468
1468
  local recorded_ruby_name recorded_ruby_match
1469
1469
 
1470
- recorded_ruby_name="$($rvm_path/scripts/tools strings "$1" \
1470
+ recorded_ruby_name="$("$rvm_path/scripts/tools" strings "$1" \
1471
1471
  | awk -F"${rvm_gemset_separator:-"@"}" '{print $1}')"
1472
1472
 
1473
1473
  [[ -z "$recorded_ruby_name" ]] && return 1
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: 13
4
+ hash: 11
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 13
10
- version: 1.0.13
9
+ - 14
10
+ version: 1.0.14
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-10-03 00:00:00 -04:00
18
+ date: 2010-10-05 00:00:00 -04:00
19
19
  default_executable: rvm-install
20
20
  dependencies: []
21
21
 
@@ -109,6 +109,8 @@ files:
109
109
  - lib/rvm/shell/single_shot_wrapper.rb
110
110
  - lib/rvm/shell/utility.rb
111
111
  - lib/rvm/version.rb
112
+ - man/man1/rvm.1
113
+ - man/man1/rvm.1.gz
112
114
  - rvm.gemspec
113
115
  - scripts/alias
114
116
  - scripts/aliases