rvm 1.1.4 → 1.1.5

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.
Files changed (112) hide show
  1. data/lib/VERSION.yml +1 -1
  2. data/lib/rvm/environment.rb +1 -1
  3. data/lib/rvm/shell/shell_wrapper.sh +1 -1
  4. data/rvm.gemspec +3 -110
  5. metadata +4 -111
  6. data/binscripts/rvm +0 -76
  7. data/binscripts/rvm-auto-ruby +0 -24
  8. data/binscripts/rvm-prompt +0 -208
  9. data/binscripts/rvm-shell +0 -35
  10. data/binscripts/rvm-update-head +0 -58
  11. data/binscripts/rvm-update-latest +0 -27
  12. data/binscripts/rvmsudo +0 -20
  13. data/config/db +0 -71
  14. data/config/known +0 -54
  15. data/config/md5 +0 -139
  16. data/contrib/gemset_snapshot +0 -25
  17. data/contrib/install-system-wide +0 -221
  18. data/contrib/r +0 -44
  19. data/examples/rvmrc +0 -49
  20. data/gemsets/default.gems +0 -1
  21. data/gemsets/global.gems +0 -1
  22. data/help/alias +0 -46
  23. data/help/benchmark +0 -17
  24. data/help/cleanup +0 -23
  25. data/help/debug +0 -8
  26. data/help/disk-usage +0 -15
  27. data/help/docs +0 -22
  28. data/help/exec +0 -33
  29. data/help/fetch +0 -5
  30. data/help/gem +0 -0
  31. data/help/gemdir +0 -0
  32. data/help/gemset +0 -14
  33. data/help/implode +0 -0
  34. data/help/info +0 -62
  35. data/help/install +0 -0
  36. data/help/list +0 -0
  37. data/help/migrate +0 -15
  38. data/help/monitor +0 -0
  39. data/help/notes +0 -0
  40. data/help/package +0 -0
  41. data/help/rake +0 -14
  42. data/help/remove +0 -0
  43. data/help/repair +0 -23
  44. data/help/reset +0 -0
  45. data/help/ruby +0 -84
  46. data/help/rubygems +0 -11
  47. data/help/rvmrc +0 -34
  48. data/help/snapshot +0 -15
  49. data/help/specs +0 -0
  50. data/help/srcdir +0 -0
  51. data/help/tests +0 -0
  52. data/help/tools +0 -22
  53. data/help/uninstall +0 -0
  54. data/help/update +0 -0
  55. data/help/upgrade +0 -18
  56. data/help/use +0 -0
  57. data/help/wrapper +0 -41
  58. data/install +0 -667
  59. data/man/man1/rvm.1 +0 -380
  60. data/man/man1/rvm.1.gz +0 -0
  61. data/scripts/alias +0 -226
  62. data/scripts/aliases +0 -4
  63. data/scripts/array +0 -32
  64. data/scripts/base +0 -57
  65. data/scripts/cd +0 -94
  66. data/scripts/cleanup +0 -58
  67. data/scripts/cli +0 -798
  68. data/scripts/color +0 -49
  69. data/scripts/completion +0 -151
  70. data/scripts/db +0 -87
  71. data/scripts/default +0 -64
  72. data/scripts/disk-usage +0 -60
  73. data/scripts/docs +0 -115
  74. data/scripts/env +0 -46
  75. data/scripts/environment-convertor +0 -74
  76. data/scripts/fetch +0 -231
  77. data/scripts/gemsets +0 -1045
  78. data/scripts/get +0 -126
  79. data/scripts/hash +0 -37
  80. data/scripts/help +0 -46
  81. data/scripts/hook +0 -23
  82. data/scripts/info +0 -213
  83. data/scripts/initialize +0 -29
  84. data/scripts/install +0 -667
  85. data/scripts/irbrc +0 -13
  86. data/scripts/irbrc.rb +0 -64
  87. data/scripts/list +0 -315
  88. data/scripts/log +0 -38
  89. data/scripts/maglev +0 -193
  90. data/scripts/manage +0 -2157
  91. data/scripts/match +0 -6
  92. data/scripts/md5 +0 -22
  93. data/scripts/migrate +0 -175
  94. data/scripts/monitor +0 -105
  95. data/scripts/notes +0 -140
  96. data/scripts/override_gem +0 -14
  97. data/scripts/package +0 -302
  98. data/scripts/patches +0 -64
  99. data/scripts/patchsets +0 -87
  100. data/scripts/repair +0 -199
  101. data/scripts/rubygems +0 -157
  102. data/scripts/rvm +0 -128
  103. data/scripts/rvm-install +0 -667
  104. data/scripts/selector +0 -904
  105. data/scripts/set +0 -301
  106. data/scripts/snapshot +0 -262
  107. data/scripts/tools +0 -58
  108. data/scripts/update +0 -667
  109. data/scripts/upgrade +0 -144
  110. data/scripts/utility +0 -1499
  111. data/scripts/version +0 -17
  112. data/scripts/wrapper +0 -210
@@ -1,11 +0,0 @@
1
-
2
- ∴ rvm rubygems [version]
3
-
4
- Installs a specific rubygems version in the current ruby. If
5
- current is specified, will install the most current rubygems
6
- as known by rvm.
7
-
8
- Please note that currently this is only compatible with ruby
9
- 1.8.* and ruby enterprise edition. If your system isn't supported,
10
- running the command will generate an error message.
11
-
data/help/rvmrc DELETED
@@ -1,34 +0,0 @@
1
-
2
- ∴ rvm rvmrc {trust,untrust,trusted,load,reset} [optional-path]
3
-
4
- Tools for dealing with and loading the rvmrc trust for a given directory.
5
- All actions take an optional path to a directory to check.
6
-
7
- Examples:
8
-
9
- To check the status of ~/My/project, you'd run:
10
-
11
- ∴ rvm rvmrc trusted ~/My/project
12
-
13
- Or, more conventionally,
14
-
15
- ∴ cd ~/My/project && rvm rvmrc trusted
16
-
17
- To manually set it as trusted:
18
-
19
- ∴ rvm rvmrc trust ~/My/project
20
-
21
- Or, to reset the trust and force a prompt:
22
-
23
- ∴ rvm rvmrc reset ~/My/project
24
-
25
- Finally, to load the rvmrc in a directory, you'd run:
26
-
27
- ∴ rvm rvmrc load ~/My/project
28
-
29
- Or,
30
-
31
- ∴ cd ~/My/project && rvm rvmrc load
32
-
33
- Note that this replaces 'rvm load-rvmrc'. Note that load implicity trusts the
34
- rvmrc, even if it is set to untrusted.
@@ -1,15 +0,0 @@
1
-
2
- ∴ rvm snapshot {load,save} filename
3
-
4
- Saves or creates a snapshot of the given rvm install. This includes:
5
-
6
- * Settings
7
- * Aliases
8
- * Rubies
9
- * Gemsets
10
- * Packages
11
- * Your Default
12
-
13
- Ideally to make it easy to have a consistent environment among machines
14
- / to back up your environment. Please note that this is still considered
15
- experimental to a large degree.
data/help/specs DELETED
File without changes
File without changes
data/help/tests DELETED
File without changes
data/help/tools DELETED
@@ -1,22 +0,0 @@
1
-
2
- ∴ rvm tools {identifier,path-identifier,strings}
3
-
4
- Provides generic tools related to rvm environments for getting information
5
- about your current environment. Primarily used for scripting rvm.
6
-
7
- Examples:
8
-
9
- To get the expanded ruby string of the current environment, we'd run:
10
-
11
- ∴ rvm tools identifier
12
-
13
- To get the identifier for a folder (taking into account rvmrc files and the like),
14
- we're instead run:
15
-
16
- ∴ rvm tools path-identifier ~/path/to/directory
17
-
18
- Lastly, we can example ruby strings. E.g., to get the current ree version, we'd
19
- run:
20
-
21
- ∴ rvm tools strings ree
22
-
File without changes
File without changes
@@ -1,18 +0,0 @@
1
-
2
- ∴ rvm upgrade ruby-prefix [optional-source]
3
-
4
- Attempts to install the latest version of a given ruby (still experimental).
5
-
6
- Given a ruby prefix (e.g. 1.9.2), it attempts to upgrade your last installed
7
- version, migrating gemsets.
8
-
9
- The process will prompt you at each stage - if the versions look incorrect,
10
- please cancel and perform it manually.
11
-
12
- Examples:
13
-
14
- If you have 1.9.2-rc2 installed and want to switch it to 1.9.2-p0,
15
-
16
- ∴ rvm upgrade 1.9.2
17
-
18
- Will install 1.9.2-p0 and migrate the gemsets.
data/help/use DELETED
File without changes
@@ -1,41 +0,0 @@
1
-
2
- ∴ rvm wrapper [ruby_string] [wrapper_prefix] [binary[ binary[ ...]]]
3
-
4
- Where ruby_string is the ruby version and gemset combination to wrap,
5
- wrapper prefix is what to prepend to the name of the generated wrapper
6
- binaries and binaries is the names of the binaries you wish to provide
7
- a wrapper for (e.g. gem).
8
-
9
- When no binaries are provided, rvm will by default generate wrappers for
10
- ruby, gem, rake, irb, rdoc, ri, and testrb.
11
-
12
- Examples:
13
-
14
- If you wish to provide an environment-specific wrapper for rspec with a
15
- rails 3 gemset, you could do:
16
-
17
- ∴ rvm --create ree@rails3
18
- ∴ rvm wrapper ree@rails3 r3 spec
19
-
20
- Which would add r3_spec with the specified environment to your the bin
21
- directory where you installed rvm.
22
-
23
- Alternatively, if you do:
24
-
25
- ∴ rvm wrapper ruby-1.9.2-head
26
-
27
- It will create binaries named ruby,gem, rake, irb, rdoc, ri and tesrb
28
- in the rvm bin directory.
29
-
30
- Finally, to show another real and common use, you can use wrapper
31
- to generate ruby executables and gems for passenger to use. Namely:
32
-
33
- ∴ rvm use ree@rails3 --passenger
34
-
35
- is equivelant to:
36
-
37
- ∴ rvm use ree@rails3
38
- ∴ rvm wrapper ree@rails3 passenger
39
-
40
- Which creates passenger_* binaries in the rvm bin directory using
41
- ree and the rails3 gemset.
data/install DELETED
@@ -1,667 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- set -o errtrace
4
-
5
- export PS4='+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }'
6
-
7
- if [[ -z "$rvm_selfcontained" ]]; then
8
- if [[ $(id -u) -eq 0 || -n "$rvm_prefix" && "$rvm_prefix" != "$HOME"/* ]]; then
9
- export rvm_selfcontained=0
10
- else
11
- export rvm_selfcontained=1
12
- fi
13
- fi
14
-
15
- unset rvm_auto_flag
16
-
17
- install_source_path="$(dirname "$0" | sed 's#\/scripts$##')"
18
-
19
- if [[ -d "$install_source_path/scripts" \
20
- && -s "$install_source_path/scripts/utility" ]] ; then
21
- builtin cd "$install_source_path"
22
- fi
23
-
24
- source scripts/version
25
- source scripts/utility
26
-
27
- usage()
28
- {
29
- printf "
30
- Usage:
31
-
32
- ${0} [options]
33
-
34
- options:
35
-
36
- --auto : Automatically update shell profile files.
37
-
38
- --prefix : Installation prefix directory.
39
-
40
- --help : Display help/usage (this) message
41
-
42
- --version : display rvm package version
43
-
44
- \n"
45
- }
46
-
47
- check_rubyopt_conditions()
48
- {
49
- if [[ -n "${RUBYOPT:-""}" ]]; then
50
- printf "
51
-
52
- WARNING: You have RUBYOPT set in your current environment.
53
- This may cause rubies to not work as you expect them to as it is not supported
54
- by all of them If errors show up, please try unsetting RUBYOPT first.
55
-
56
- "
57
- fi
58
- }
59
-
60
- andand_return_instructions()
61
- {
62
- printf "
63
- This means that if you see something like:
64
-
65
- '[ -z \"\$PS1\" ] && return'
66
-
67
- then you change this line to:
68
-
69
- if [[ -n \"\$PS1\" ]] ; then
70
-
71
- # ... original content that was below the '&& return' line ...
72
-
73
- fi # <= be sure to close the if at the end of the .bashrc.
74
-
75
- # This is a good place to source rvm v v v
76
- [[ -s \"\$HOME/.rvm/scripts/rvm\" ]] && source \"\$HOME/.rvm/scripts/rvm\" # This loads RVM into a shell session.
77
-
78
- EOF - This marks the end of the .bashrc file
79
- "
80
- }
81
-
82
- installation_complete()
83
- {
84
- printf "
85
- You must now complete the install by loading RVM in new shells.
86
-
87
- 1) Place the folowing line at the end of your shell's loading files
88
- (.bashrc or .bash_profile for bash and .zshrc for zsh),
89
- after all PATH/variable settings:
90
-
91
- [[ -s \"\$HOME/.rvm/scripts/rvm\" ]] && source \"\$HOME/.rvm/scripts/rvm\" # This loads RVM into a shell session.
92
-
93
- You only need to add this line the first time you install rvm.
94
-
95
- 2) Ensure that there is no 'return' from inside the ~/.bashrc file,
96
- otherwise rvm may be prevented from working properly.
97
-
98
- $(andand_return_instructions)
99
-
100
- Be absolutely *sure* to REMOVE the '&& return'.
101
-
102
- If you wish to DRY up your config you can 'source ~/.bashrc' at the bottom of your .bash_profile.
103
-
104
- Placing all non-interactive (non login) items in the .bashrc,
105
- including the 'source' line above and any environment settings.
106
-
107
- 3) CLOSE THIS SHELL and open a new one in order to use rvm.
108
- \n"
109
- }
110
-
111
- andand_return_warning()
112
- {
113
- printf "
114
- WARNING: you have a 'return' statement in your ~/.bashrc
115
- This could cause some features of RVM to not work.
116
-
117
- $(andand_return_instructions)
118
-
119
- Even if you are using zsh you should still adjust the ~/.bashrc
120
- If you have any questions about this please visit
121
- #rvm on irc.freenode.net.
122
- \n"
123
- }
124
-
125
- thank_you()
126
- {
127
- printf "
128
- ${name:-"${USER:-$(id | sed -e 's/^[^(]*(//' -e 's/).*$//')}"},
129
-
130
- Thank you very much for using RVM! I sincerely hope that RVM helps to
131
- make your work both easier and more enjoyable.
132
-
133
- If you have any questions, issues and/or ideas for improvement please
134
- join#rvm on irc.freenode.net and let me know, note you must register
135
- (http://bit.ly/5mGjlm) and identify (/msg nickserv <nick> <pass>) to
136
- talk, this prevents spambots from ruining our day.
137
-
138
- My irc nickname is 'wayneeseguin' and I hang out in #rvm typically
139
-
140
- ~09:00-17:00EDT and again from ~21:00EDT-~23:00EDT
141
-
142
- If I do not respond right away, please hang around after asking your
143
- question, I will respond as soon as I am back. It is best to talk in
144
- #rvm itself as then other users can help out should I be offline.
145
-
146
- Be sure to get head often as rvm development happens fast,
147
- you can do this by running 'rvm get head' followed by 'rvm reload'
148
- or opening a new shell
149
-
150
- w⦿‿⦿t
151
-
152
- ~ Wayne
153
-
154
- "
155
- }
156
-
157
- upgrade_notes()
158
- {
159
- printf "
160
-
161
- Upgrade Notes
162
-
163
- * rvm_trust_rvmrcs has been changed to rvm_trust_rvmrcs_flag for consistency
164
-
165
- * Ruby package dependency list for your OS is given by:
166
- rvm notes
167
-
168
- * If you encounter any issues with a ruby 'X' your best bet is to:
169
- rvm remove X ; rvm install X
170
-
171
- * If you wish to have the 'pretty colors' again, set in ~/.rvmrc:
172
- export rvm_pretty_print_flag=1
173
-
174
- * If you see the following error message: Unknown alias name: 'default'
175
- re-set your default ruby, this is due to a change in how default works.
176
- "
177
- }
178
-
179
- set -o noclobber
180
- set -o nounset
181
-
182
- while [[ $# -gt 0 ]] ; do
183
- token="$1" ; shift
184
- case "$token" in
185
- --auto) rvm_auto_flag=1 ;;
186
- --prefix) rvm_prefix="$1" ; shift ;;
187
- --version) rvm_path="$PWD" ; __rvm_version ; unset rvm_path ; exit ;;
188
- --debug)
189
- set -o verbose
190
- ;;
191
- --trace)
192
- echo "$*"
193
- env | grep '^rvm_'
194
- set -o xtrace
195
- ;;
196
- --help)
197
- usage
198
- exit 0
199
- ;;
200
- *)
201
- echo "Unrecognized option: $token"
202
- usage
203
- exit 1
204
- ;;
205
- esac
206
- done
207
-
208
- if [[ -z "${rvm_prefix:-""}" ]] ; then
209
-
210
- if [[ "$USER" = "root" ]] ; then
211
-
212
- source /etc/rvmrc
213
-
214
- if [[ ${rvm_selfcontained:-0} -eq 0 ]] ; then
215
- rvm_prefix="${rvm_prefix:-"/usr/local/"}"
216
- else
217
- rvm_prefix="${rvm_prefix:-"$HOME/."}"
218
- fi
219
-
220
- else
221
-
222
- rvm_prefix="${rvm_prefix:-"$HOME/."}"
223
-
224
- fi
225
-
226
- fi
227
-
228
- if [[ -z "${rvm_path:-""}" ]] ; then
229
- rvm_path="${rvm_prefix}rvm"
230
- fi
231
-
232
- source scripts/initialize
233
-
234
- if grep -q 'scripts/rvm' "$HOME"/.bash* 2>/dev/null \
235
- || grep -q 'scripts/rvm' "$HOME"/.zsh* 2>/dev/null ; then
236
-
237
- if [[ -d "$rvm_path" ]] && [[ -s "${rvm_path}/scripts/rvm" ]] ; then
238
-
239
- export upgrade_flag=1
240
-
241
- else
242
-
243
- export upgrade_flag=0
244
-
245
- fi
246
-
247
- else
248
-
249
- export upgrade_flag=0
250
-
251
- fi
252
-
253
- __rvm_initialize
254
-
255
- #
256
- # Setup & Configuration
257
- #
258
- item="* "
259
- question="\n<?>"
260
- cwd="$PWD"
261
-
262
- source_path="${source_path:-$cwd}"
263
-
264
- if [[ "$rvm_selfcontained" = "0" ]] ; then
265
- rvm_bin_path="${rvm_bin_path:-"${rvm_prefix}bin"}"
266
- rvm_man_path="${rvm_man_path:-"${rvm_prefix}share/man"}"
267
- rvm_rc_files="${rvm_rc_files:-"/etc/profile /etc/zshenv"}"
268
- else
269
- rvm_man_path="${rvm_man_path:-"$rvm_path/man"}"
270
- rvm_bin_path="${rvm_bin_path:-"$rvm_path/bin"}"
271
- rvm_rc_files="${rvm_rc_files:-"$HOME/.bash_profile $HOME/.bashrc $HOME/.zshenv"}"
272
- fi
273
-
274
- rvm_gems_path="${rvm_gems_path:-"$rvm_path/gems"}"
275
- rvm_tmp_path="${rvm_tmp_path:-"$rvm_path/tmp"}"
276
-
277
- printf "
278
- RVM: Shell scripts enabling management of multiple ruby environments.
279
- RTFM: http://rvm.beginrescueend.com/
280
- HELP: http://webchat.freenode.net/?channels=rvm (#rvm on irc.freenode.net)
281
- "
282
-
283
- if [[ ${upgrade_flag:-0} -eq 1 ]] ;then
284
-
285
- printf "\nUpgrading the RVM installation in $rvm_path/"
286
-
287
- else
288
-
289
- printf "\nInstalling RVM to $rvm_path/"
290
-
291
- fi
292
-
293
- directories=(
294
- "${rvm_archives_path:-"$rvm_path/archives"}"
295
- "${rvm_src_path:-"$rvm_path/src"}"
296
- "${rvm_log_path:-"$rvm_path/log"}"
297
- "$rvm_bin_path"
298
- "${rvm_gems_path:-"$rvm_path/gems"}"
299
- "${rvm_rubies_path:-"$rvm_path/rubies"}"
300
- "$rvm_path/config"
301
- "${rvm_tmp_path:-"$rvm_path/tmp"}"
302
- "$rvm_path/bin"
303
- )
304
-
305
- for directory in "${directories[@]}" ; do
306
-
307
- if [[ ! -d "$directory" ]] ; then
308
-
309
- mkdir -p "$directory"
310
-
311
- fi
312
-
313
- done
314
-
315
- files=(README LICENCE)
316
-
317
- for file in "${files[@]}"; do
318
-
319
- cp -f "$source_path/$file" "$rvm_path/"
320
-
321
- done
322
-
323
- #
324
- # Scripts
325
- #
326
- for dir_name in config scripts examples lib hooks help patches; do
327
-
328
- if [[ -d "$source_path/$dir_name" ]] ; then
329
-
330
- if [[ ! -d "$rvm_path/$dir_name" ]] ; then
331
-
332
- mkdir -p "$rvm_path/$dir_name"
333
-
334
- fi
335
-
336
- cp -Rf "$source_path/$dir_name" "$rvm_path"
337
-
338
- fi
339
-
340
- done
341
-
342
- if [[ ! -s "$rvm_path/config/user" ]] ; then
343
- echo '# User settings, overrides db settings and persists across installs.' \
344
- >> "$rvm_path/config/user"
345
- fi
346
-
347
- scripts=(monitor match log install color db fetch log set package)
348
-
349
- for script_name in "${scripts[@]}" ; do
350
-
351
- chmod +x "$rvm_path/scripts/$script_name" 2>/dev/null # Hide errors.
352
-
353
- done
354
-
355
- #
356
- # Bin Scripts
357
- #
358
- # Cleanse and purge...
359
- files=(rvm-prompt rvm rvmsudo rvm-shell rvm-auto-ruby)
360
-
361
- for file in "${files[@]}" ; do
362
-
363
- rm -f "$rvm_bin_path/$file"
364
-
365
- cp -f "$source_path/binscripts/$file" "${rvm_bin_path:-"$rvm_path/bin"}/"
366
-
367
- chmod +x "${rvm_bin_path:-"$rvm_path/bin"}/$file"
368
-
369
- done
370
-
371
- #
372
- # RC Files
373
- #
374
- if [[ ${rvm_auto_flag:-0} -eq 1 ]] ; then
375
-
376
- printf "Checking rc files... ($rvm_rc_files)"
377
-
378
- if [[ ${rvm_loaded_flag:-0} -ne 1 ]] ; then
379
-
380
- for rcfile in $(printf $rvm_rc_files) ; do
381
-
382
- if [[ ! -f $rcfile ]] ; then touch $rcfile ; fi
383
-
384
- if [[ -s "$HOME/.profile" ]] ; then
385
-
386
- if ! grep -q '.profile' "$rcfile" ; then
387
-
388
- echo " Adding profile sourcing line to $rcfile."
389
-
390
- printf "
391
- # rvm install added line:
392
- [[ -s \"$rvm_path/.profile\" ]] && source \"$rvm_path/.profile\"
393
- " >> "$rcfile"
394
-
395
- fi
396
-
397
- fi
398
-
399
- if ! grep -q "scripts\/rvm" "$rcfile" ; then
400
-
401
- echo " Adding rvm loading line to $rcfile."
402
-
403
- printf "
404
- # rvm install added:
405
- [[ -s \"$rvm_path/.rvm/scripts/rvm\" ]] && . \"$rvm_path/.rvm/scripts/rvm\"
406
- " >> "$rcfile"
407
-
408
- fi
409
-
410
- done
411
- fi
412
- fi
413
-
414
- #
415
- # Initial Interpreter Gemsets.
416
- #
417
- if [[ -d gemsets/ ]] ; then
418
-
419
- if [[ ! -d "$rvm_path/gemsets" ]] ; then
420
-
421
- mkdir -p "$rvm_path/gemsets"
422
-
423
- fi
424
-
425
- for gemset_file in $(find "$PWD/gemsets" -iname '*.gems' | sed 's/^\.\///') ; do
426
-
427
- cwd="${PWD//\//\\/}\/gemsets\/"
428
-
429
- destination="$rvm_path/gemsets/${gemset_file/$cwd}"
430
-
431
- destination_path="$(dirname "$destination")"
432
-
433
- if [[ ! -s "$destination" ]] ; then
434
-
435
- mkdir -p "$destination_path"
436
-
437
- cp "$gemset_file" "$destination"
438
-
439
- fi
440
-
441
- done
442
-
443
- fi
444
-
445
- if [[ -d patchsets/ ]] ; then
446
-
447
- if [[ ! -d "$rvm_path/patchsets" ]] ; then
448
-
449
- mkdir -p "$rvm_path/patchsets"
450
-
451
- fi
452
-
453
- patchsets=($(builtin cd patchsets ; find \. -iname '*' | sed 's/^\.\///'))
454
-
455
- for patchset_file in "${patchsets[@]}" ; do
456
-
457
- destination="$rvm_path/patchsets/$patchset_file"
458
-
459
- if [[ ! -s "$destination" ]] ; then
460
-
461
- destination_path="$(dirname "$destination")"
462
-
463
- mkdir -p "$destination_path"
464
-
465
- cp "patchsets/$patchset_file" "$destination"
466
-
467
- fi
468
- done
469
-
470
- fi
471
-
472
- #
473
- # Migrate ~/.rvm/ruby-X,jruby-X,... to ~/.rvm/rubies/ for 0.1.0.
474
- #
475
- mkdir -p "${rvm_rubies_path:-"$rvm_path/rubies"}/"
476
-
477
- for ruby in $rvm_path/ruby-* $rvm_path/jruby-* $rvm_path/goruby\
478
- $rvm_path/rbx-* $rvm_path/maglev-* $rvm_path/ree-* ; do
479
-
480
- if [[ -d "$ruby" ]] ; then
481
-
482
- mv "$ruby" "${rvm_rubies_path:-"$rvm_path/rubies"}/"
483
-
484
- new_path="${rvm_rubies_path:-"$rvm_path/rubies"}/$(basename $ruby)"
485
-
486
- for file in gem rake ; do
487
-
488
- if [[ -s "$new_path/bin/$file" ]] ; then
489
-
490
- sed -e '1,1s=.*=#!'"${new_path}/bin/ruby=" "${new_path}/bin/${file}" \
491
- > "${new_path}/bin/${file}.new"
492
-
493
- mv -f "$new_path/bin/$file.new" "$new_path/bin/$file"
494
-
495
- chmod +x "$new_path/bin/$file"
496
-
497
- fi
498
-
499
- done
500
-
501
- fi
502
-
503
- done
504
- #
505
- # End of rubies migration.
506
- #
507
-
508
- if [[ -d "$rvm_path/environments" ]] ; then
509
- #
510
- # Remove BUNDLE_PATH from environment files
511
- #
512
- environments=($( find "$rvm_path/environments" -maxdepth 1 -mindepth 1 -type f ))
513
- for file in "${environments[@]}" ; do
514
- if grep 'BUNDLE_PATH' "$file" > /dev/null ; then
515
- grep -v 'BUNDLE_PATH' "$file" > "$file.new"
516
- mv "$file.new" "$file"
517
- fi
518
- done
519
- fi
520
- #
521
- # Migrate old gemset directories to new gemset pattern.
522
- #
523
- for gemset in "$rvm_path"/gems/*\%* ; do
524
-
525
- new_path=${gemset/\%/${rvm_gemset_separator:-"@"}}
526
-
527
- if [[ -d "$gemset" ]] && [[ ! -d "$new_path" ]] ; then
528
-
529
- printf "\n Renaming $(basename "$gemset") to $(basename "$new_path") for new gemset separator."
530
-
531
- mv "$gemset" "$new_path"
532
-
533
- fi
534
-
535
- done
536
-
537
- for gemset in "$rvm_path"/gems/*\+* ; do
538
-
539
- new_path=${gemset/\+/${rvm_gemset_separator:-"@"}}
540
-
541
- if [[ -d "$gemset" && ! -d "$new_path" ]] ; then
542
-
543
- printf "\n Renaming $(basename "$gemset") to $(basename "$new_path") for new gemset separator."
544
-
545
- mv $gemset $new_path
546
-
547
- fi
548
-
549
- done
550
-
551
- for gemset in "$rvm_path"/gems/*\@ ; do
552
-
553
- new_path=$(echo $gemset | sed -e 's#\@$##')
554
-
555
- if [[ -d "$gemset" && ! -d "$new_path" ]] ; then
556
-
557
- printf "\n Fixing: $(basename "$gemset") to $(basename "$new_path") for new gemset separator."
558
-
559
- mv "$gemset" "$new_path"
560
-
561
- fi
562
-
563
- done
564
-
565
- # Move from legacy defaults to the new, alias based system.
566
- if [[ -s "$rvm_path/config/default" ]]; then
567
-
568
- original_version="$(basename "$(grep GEM_HOME "$rvm_path/config/default" \
569
- | awk -F"'" '{print $2}' | sed "s#\%#${rvm_gemset_separator:-"@"}#")")"
570
-
571
- if [[ -n "$original_version" ]]; then
572
-
573
- "$rvm_path/scripts/alias" create default "$original_version" &> /dev/null
574
-
575
- fi ; unset original_version
576
-
577
- rm -rf "$rvm_path/config/default"
578
-
579
- fi
580
-
581
- #
582
- # End of gemset migration.
583
- #
584
- declare -a files
585
-
586
- printf "\n Correct permissions for base binaries in $rvm_bin_path..."
587
-
588
- mkdir -p "${rvm_bin_path:-"$rvm_path/bin"}"
589
-
590
- files=(rvm rvmsudo rvm-shell rvm-auto-ruby)
591
- for file in "${files[@]}" ; do
592
-
593
- if [[ -s "${rvm_bin_path:-"$rvm_path/bin"}/$file" ]] ; then
594
-
595
- chmod +x "${rvm_bin_path:-"$rvm_path/bin"}/$file"
596
-
597
- fi
598
-
599
- done
600
-
601
- printf "\n Copying manpages into place.\n"
602
-
603
- files=($(builtin cd "$install_source_path/man" ; \
604
- find . -maxdepth 1 -mindepth 1 -type f -print))
605
-
606
- for file in "${files[@]//.\/}" ; do
607
-
608
- rm -rf "$rvm_man_path/$file"
609
-
610
- cp -R "$install_source_path/man/$file" "$rvm_man_path/"
611
-
612
- done
613
-
614
- files=($( find "$rvm_path/" -mindepth 1 -maxdepth 2 -iname '*.swp' -type f ))
615
-
616
- if [[ ${#files[@]} -gt 0 ]] ; then
617
-
618
- printf "\n Cleanup any .swp files."
619
-
620
- for file in "${files[@]}" ; do
621
-
622
- if [[ -f "$file" ]] ; then
623
- rm -f "$file"
624
- fi
625
-
626
- done
627
- fi
628
-
629
- if [[ $upgrade_flag -eq 0 ]] ; then
630
- chmod +x ./scripts/notes # Sometimes things don't clone properly :/
631
- ./scripts/notes
632
- fi
633
-
634
- if command -v git > /dev/null 2>&1 ; then
635
- name="$(git config user.name 2>/dev/null)"
636
- fi
637
-
638
- if [[ ${upgrade_flag:-0} -eq 1 ]] ; then
639
-
640
- upgrade_notes
641
-
642
- check_rubyopt_conditions
643
-
644
- printf "\nUpgrade of RVM in $rvm_path/ is complete.\n\n"
645
-
646
- else
647
-
648
- if [[ ${rvm_selfcontained:-0} -eq 1 ]] ; then
649
-
650
- installation_complete
651
-
652
- fi
653
-
654
- if [[ -s "$HOME/.bashrc" ]] && grep -q '&& return' "$HOME/.bashrc" ; then
655
-
656
- andand_return_warning
657
-
658
- fi
659
-
660
- check_rubyopt_conditions
661
-
662
- printf "\nInstallation of RVM to $rvm_path/ is complete.\n\n"
663
- fi
664
-
665
- thank_you
666
-
667
- exit 0