rvm 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README +2 -5
- data/binscripts/rvm-prompt +4 -2
- data/binscripts/rvm-shell +1 -1
- data/config/known +20 -20
- data/examples/rvmrc +0 -4
- data/install +153 -29
- data/lib/VERSION.yml +1 -1
- data/rvm.gemspec +2 -2
- data/scripts/alias +26 -22
- data/scripts/base +1 -1
- data/scripts/cleanup +32 -8
- data/scripts/cli +104 -115
- data/scripts/db +3 -3
- data/scripts/default +1 -1
- data/scripts/disk-usage +1 -1
- data/scripts/docs +28 -18
- data/scripts/env +1 -1
- data/scripts/environment-convertor +2 -2
- data/scripts/fetch +17 -17
- data/scripts/gemsets +394 -159
- data/scripts/help +8 -4
- data/scripts/hook +1 -1
- data/scripts/info +5 -5
- data/scripts/initialize +16 -6
- data/scripts/install +153 -29
- data/scripts/list +38 -35
- data/scripts/log +6 -3
- data/scripts/maglev +18 -18
- data/scripts/manage +306 -203
- data/scripts/migrate +12 -12
- data/scripts/monitor +5 -5
- data/scripts/notes +1 -1
- data/scripts/package +18 -12
- data/scripts/patches +8 -3
- data/scripts/patchsets +42 -10
- data/scripts/repair +12 -12
- data/scripts/rubygems +11 -11
- data/scripts/rvm +4 -7
- data/scripts/rvm-install +153 -29
- data/scripts/selector +139 -121
- data/scripts/set +11 -11
- data/scripts/snapshot +54 -35
- data/scripts/tools +2 -2
- data/scripts/update +153 -29
- data/scripts/upgrade +8 -8
- data/scripts/utility +59 -74
- data/scripts/wrapper +2 -2
- metadata +4 -4
data/scripts/upgrade
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
3
|
unset GREP_OPTIONS
|
4
|
-
source "$
|
4
|
+
source "$rvm_path/scripts/base"
|
5
5
|
|
6
6
|
usage() {
|
7
7
|
echo "Usage: rvm upgrade prefix [specific version]" >&2
|
@@ -21,12 +21,12 @@ confirm() {
|
|
21
21
|
}
|
22
22
|
|
23
23
|
die_with_error() {
|
24
|
-
"$
|
24
|
+
"$rvm_path/scripts/log" "fail" "$1"
|
25
25
|
exit "${2:-1}"
|
26
26
|
}
|
27
27
|
|
28
28
|
expand_ruby_name() {
|
29
|
-
"$
|
29
|
+
"$rvm_path/scripts/tools" strings "$1" | awk -F"${rvm_gemset_separator:-"@"}" '{print $1}'
|
30
30
|
}
|
31
31
|
|
32
32
|
expand_existing_ruby() {
|
@@ -40,7 +40,7 @@ expand_existing_ruby() {
|
|
40
40
|
echo "$ruby_name" ; return 0
|
41
41
|
fi
|
42
42
|
|
43
|
-
done < <("$
|
43
|
+
done < <("$rvm_path/scripts/list" strings | tr ' ' '\n' | sort -ur | \grep "^$prefix" | \grep -v '-head$' | head -n1)
|
44
44
|
|
45
45
|
return 1
|
46
46
|
}
|
@@ -57,7 +57,7 @@ upgrade_ruby() {
|
|
57
57
|
|
58
58
|
if [[ ! -d "$rvm_rubies_path/$expanded_destination" ]]; then
|
59
59
|
|
60
|
-
"$
|
60
|
+
"$rvm_path/scripts/log" "info" \
|
61
61
|
"Installing new ruby $expanded_destination"
|
62
62
|
|
63
63
|
$rvm_bin_path/rvm install "$expanded_destination"
|
@@ -66,15 +66,15 @@ upgrade_ruby() {
|
|
66
66
|
|
67
67
|
fi
|
68
68
|
|
69
|
-
"$
|
69
|
+
"$rvm_path/scripts/log" "info" \
|
70
70
|
"Migrating gems from $expanded_source to $expanded_destination"
|
71
71
|
|
72
|
-
"$
|
72
|
+
"$rvm_path/scripts/migrate" "$expanded_source" "$expanded_destination"
|
73
73
|
result="$?"
|
74
74
|
|
75
75
|
[[ "$result" -gt 0 ]] && die_with_error "Error migrating gems." "$result"
|
76
76
|
|
77
|
-
"$
|
77
|
+
"$rvm_path/scripts/log" "info" "Upgrade complete!"
|
78
78
|
}
|
79
79
|
|
80
80
|
args=($*)
|
data/scripts/utility
CHANGED
@@ -14,10 +14,6 @@ __rvm_setup() {
|
|
14
14
|
}
|
15
15
|
|
16
16
|
__rvm_teardown() {
|
17
|
-
declare rvm_dump_environment_flag=${rvm_dump_environment_flag:-0}
|
18
|
-
declare rvm_clang_flag=${rvm_clang_flag:-0}
|
19
|
-
declare rvm_prior_cc=${rvm_prior_cc:-""}
|
20
|
-
|
21
17
|
if [[ -n "${ZSH_VERSION:-""}" ]] ; then
|
22
18
|
if [[ "$rvm_zsh_clobber" -eq 0 ]] ; then
|
23
19
|
setopt noclobber
|
@@ -30,18 +26,17 @@ __rvm_teardown() {
|
|
30
26
|
# the cleanup phase.
|
31
27
|
|
32
28
|
# Clean up after CC switch
|
33
|
-
if [[
|
34
|
-
if [[ -n "$rvm_prior_cc" ]] ; then
|
29
|
+
if [[ ${rvm_clang_flag:-0} -gt 0 ]] ; then
|
30
|
+
if [[ -n "${rvm_prior_cc:-""}" ]] ; then
|
35
31
|
export CC="$rvm_prior_cc"
|
36
32
|
else
|
37
33
|
unset CC
|
38
34
|
fi
|
39
|
-
unset rvm_prior_cc
|
40
35
|
fi
|
41
36
|
|
42
|
-
unset rvm_ruby_strings
|
37
|
+
unset rvm_ruby_strings rvm_head_flag rvm_prior_cc
|
43
38
|
|
44
|
-
[[ $rvm_dump_environment_flag -eq 1 ]] && __rvm_dump_environment
|
39
|
+
[[ ${rvm_dump_environment_flag:-0} -eq 1 ]] && __rvm_dump_environment
|
45
40
|
|
46
41
|
return 0
|
47
42
|
}
|
@@ -63,7 +58,7 @@ __rvm_dump_environment() {
|
|
63
58
|
\rm -f "$dump_environment_file" && ln -s /dev/null "$dump_environment_file" >/dev/null 2>&1
|
64
59
|
|
65
60
|
else
|
66
|
-
"$
|
61
|
+
"$rvm_path/scripts/environment-convertor" "$dump_environment_type" "$(__rvm_environment_identifier)" > "$dump_environment_file"
|
67
62
|
if [[ "$?" -gt 0 && -f "$dump_environment_file" ]] ; then
|
68
63
|
\rm -f "$dump_environment_file"
|
69
64
|
fi
|
@@ -104,11 +99,11 @@ __rvm_db() {
|
|
104
99
|
variable=${2:-""}
|
105
100
|
|
106
101
|
if [[ -f "$rvm_config_path/user" ]] ; then
|
107
|
-
value="$($
|
102
|
+
value="$($rvm_path/scripts/db "$rvm_config_path/user" "$key")"
|
108
103
|
fi
|
109
104
|
|
110
105
|
if [[ -z "$value" ]] ; then
|
111
|
-
value="$($
|
106
|
+
value="$($rvm_path/scripts/db "$rvm_config_path/db" "$key")"
|
112
107
|
fi
|
113
108
|
|
114
109
|
if [[ -n "$value" ]] ; then
|
@@ -163,7 +158,7 @@ __rvm_quote_args_with_shift() {
|
|
163
158
|
__rvm_warn_on_rubyopt() {
|
164
159
|
|
165
160
|
if [[ -n "${RUBYOPT:-""}" ]]; then
|
166
|
-
"$
|
161
|
+
"$rvm_path/scripts"/log "warn" \
|
167
162
|
"Please note: You have the RUBYOPT environment variable set and this may interfere with normal rvm operations. We sugges unsetting it."
|
168
163
|
return 1
|
169
164
|
else
|
@@ -200,20 +195,6 @@ __rvm_push() {
|
|
200
195
|
return 0
|
201
196
|
}
|
202
197
|
|
203
|
-
__rvm_set_path_variable() {
|
204
|
-
|
205
|
-
if [[ -d "$1" ]] ; then
|
206
|
-
eval "${path_variable}=${1}"
|
207
|
-
|
208
|
-
else
|
209
|
-
"$rvm_scripts_path/log" "error" \
|
210
|
-
"'$1' is not a valid path."
|
211
|
-
unset path_variable
|
212
|
-
fi
|
213
|
-
|
214
|
-
return 0
|
215
|
-
}
|
216
|
-
|
217
198
|
# Clean all *duplicate* items out of the path. (keep first occurrence of each)
|
218
199
|
__rvm_clean_path() {
|
219
200
|
PATH="$(echo $PATH | \tr -s ':' '\n' | awk '!($0 in a){a[$0];print}' | \tr -s '\n' ':' | sed 's#:$##')"
|
@@ -243,10 +224,10 @@ __rvm_run() {
|
|
243
224
|
|
244
225
|
if [[ -z "${rvm_ruby_log_path:-""}" ]] ; then rvm_ruby_log_path="$rvm_log_path" ; fi
|
245
226
|
|
246
|
-
if [[ -n "$message" ]] ; then "$
|
227
|
+
if [[ -n "$message" ]] ; then "$rvm_path/scripts/log" "info" "$message" ; fi
|
247
228
|
|
248
229
|
if [[ ${rvm_debug_flag:-0} -gt 0 ]] ; then
|
249
|
-
"$
|
230
|
+
"$rvm_path/scripts/log" "debug" "Executing: $command"
|
250
231
|
fi
|
251
232
|
|
252
233
|
\mkdir -p "$(dirname "$rvm_ruby_log_path/$log_file_name.log")"
|
@@ -265,7 +246,7 @@ __rvm_run() {
|
|
265
246
|
local result=$?
|
266
247
|
|
267
248
|
if [[ $result -gt 0 ]] ; then
|
268
|
-
"$
|
249
|
+
"$rvm_path/scripts/log" "error" \
|
269
250
|
"Error running '$command', please check $rvm_ruby_log_path/$log_file_name*.log"
|
270
251
|
fi
|
271
252
|
|
@@ -286,10 +267,10 @@ __rvm_run_with_env() {
|
|
286
267
|
|
287
268
|
if [[ -z "$rvm_ruby_log_path" ]] ; then rvm_ruby_log_path="$rvm_log_path" ; fi
|
288
269
|
|
289
|
-
if [[ -n "$message" ]] ; then "$
|
270
|
+
if [[ -n "$message" ]] ; then "$rvm_path/scripts/log" "info" "$message" ; fi
|
290
271
|
|
291
272
|
if [[ ${rvm_debug_flag:-0} -gt 0 ]] ; then
|
292
|
-
"$
|
273
|
+
"$rvm_path/scripts/log" "debug" "Executing: $command in environment "$env_name""
|
293
274
|
fi
|
294
275
|
|
295
276
|
\mkdir -p "$(dirname "$rvm_ruby_log_path/$log_file_name.log")"
|
@@ -308,7 +289,7 @@ __rvm_run_with_env() {
|
|
308
289
|
result=$?
|
309
290
|
|
310
291
|
if [[ $result -gt 0 ]] ; then
|
311
|
-
"$
|
292
|
+
"$rvm_path/scripts/log" "error" \
|
312
293
|
"Error running '$command' under $env_name, please check $rvm_ruby_log_path/$log_file_name*.log"
|
313
294
|
fi
|
314
295
|
|
@@ -328,6 +309,7 @@ __rvm_unset_ruby_variables() {
|
|
328
309
|
# Unset both rvm variables as well as ruby-specific variables
|
329
310
|
# Preserve gemset if 'rvm_sticky' is set (persist gemset unless clear is explicitely called).
|
330
311
|
__rvm_cleanse_variables() {
|
312
|
+
|
331
313
|
__rvm_unset_ruby_variables
|
332
314
|
|
333
315
|
if [[ ${rvm_sticky_flag:-0} -eq 1 ]] ; then export rvm_gemset_name ; else unset rvm_gemset_name ; fi
|
@@ -353,9 +335,9 @@ __rvm_with_env() {
|
|
353
335
|
__rvm_18_compat_ruby() {
|
354
336
|
local rubies ruby_name
|
355
337
|
|
356
|
-
rubies=($( cd "$rvm_rubies_path" ; find
|
338
|
+
rubies=($( cd "$rvm_rubies_path" ; find . -maxdepth 1 -mindepth 1 -type d ))
|
357
339
|
|
358
|
-
for ruby_name in "${rubies[@]}"; do
|
340
|
+
for ruby_name in "${rubies[@]//.\/}"; do
|
359
341
|
|
360
342
|
if [[ ! -L "$rvm_rubies_path/$ruby_name" ]] ; then
|
361
343
|
|
@@ -376,9 +358,9 @@ __rvm_ensure_has_18_compat_ruby() {
|
|
376
358
|
# TODO: install currently doesn't return the correct status.
|
377
359
|
local compat_result=0
|
378
360
|
|
379
|
-
if ! ( "$
|
361
|
+
if ! ( "$rvm_path/scripts/manage" install 1.8.7 ); then
|
380
362
|
|
381
|
-
"$
|
363
|
+
"$rvm_path/scripts/log" "fail" \
|
382
364
|
"To proceed rvm requires a 1.8-compatible ruby is installed. We attempted to install 1.8.7 automatically but it failed.\
|
383
365
|
Please install it manually (or a compatible alternative) to proceed."
|
384
366
|
|
@@ -396,8 +378,11 @@ __rvm_ensure_has_18_compat_ruby() {
|
|
396
378
|
# Cleans up temp folders for a given prefix,
|
397
379
|
# typically the current process id.
|
398
380
|
__rvm_cleanup_temp_for() {
|
381
|
+
result=$? # Capture last command status
|
382
|
+
|
383
|
+
local prefix
|
399
384
|
|
400
|
-
|
385
|
+
prefix="$1"
|
401
386
|
|
402
387
|
[[ -z "$prefix" ]] && return 1
|
403
388
|
|
@@ -405,7 +390,7 @@ __rvm_cleanup_temp_for() {
|
|
405
390
|
\rm -rf "$rvm_tmp_path/$prefix"* >/dev/null 2>&1
|
406
391
|
fi
|
407
392
|
|
408
|
-
|
393
|
+
return $result
|
409
394
|
}
|
410
395
|
|
411
396
|
__rvm_set_rvmrc() {
|
@@ -415,7 +400,7 @@ __rvm_set_rvmrc() {
|
|
415
400
|
|
416
401
|
if [[ -s .rvmrc ]] ; then
|
417
402
|
mv .rvmrc .rvmrc.$(date +%m.%d.%Y-%H:%M:%S)
|
418
|
-
"$
|
403
|
+
"$rvm_path/scripts/log" "warning" ".rvmrc is not empty, moving aside to preserve."
|
419
404
|
fi
|
420
405
|
|
421
406
|
local identifier=$(__rvm_environment_identifier)
|
@@ -425,7 +410,7 @@ __rvm_set_rvmrc() {
|
|
425
410
|
|
426
411
|
unset flags
|
427
412
|
else
|
428
|
-
"$
|
413
|
+
"$rvm_path/scripts/log" "error" ".rvmrc cannot be set in your home directory. \n The home .rvmrc is for global rvm settings only."
|
429
414
|
fi
|
430
415
|
}
|
431
416
|
__rvm_load_rvmrc() {
|
@@ -435,7 +420,7 @@ __rvm_load_rvmrc() {
|
|
435
420
|
for rvmrc in /etc/rvmrc $HOME/.rvmrc ; do
|
436
421
|
if [[ -f "$rvmrc" ]] ; then
|
437
422
|
if \grep -q '^\s*rvm .*$' $rvmrc ; then
|
438
|
-
"$
|
423
|
+
"$rvm_path/scripts/log" "error" "$rvmrc is for rvm settings only.\nrvm CLI may NOT be called from within $rvmrc. \nSkipping the loading of $rvmrc"
|
439
424
|
return 1
|
440
425
|
else
|
441
426
|
source "$rvmrc"
|
@@ -462,7 +447,7 @@ __rvm_benchmark() {
|
|
462
447
|
# TODO: We can likely do this in a subshell in order to preserve the original environment?
|
463
448
|
unset rvm_ruby_string
|
464
449
|
export rvm_ruby_strings
|
465
|
-
"$
|
450
|
+
"$rvm_path/scripts/set" "$rvm_action" $rvm_ruby_args
|
466
451
|
result=$?
|
467
452
|
# Restore the state pre-sets.
|
468
453
|
[[ -n "$old_rvm_ruby_string" ]] && rvm_ruby_string=$old_rvm_ruby_string
|
@@ -485,7 +470,7 @@ __rvm_bin_scripts() {
|
|
485
470
|
# Write the bin/ wrapper script for currently selected ruby.
|
486
471
|
# TODO: Adjust binscript to be able to handle all rubies not just the standard interpreteres.
|
487
472
|
__rvm_bin_script() {
|
488
|
-
"$
|
473
|
+
"$rvm_path/scripts/wrapper" "$rvm_ruby_string"
|
489
474
|
return $?
|
490
475
|
}
|
491
476
|
|
@@ -521,7 +506,7 @@ __rvm_reset() {
|
|
521
506
|
__rvm_unset_ruby_variables
|
522
507
|
|
523
508
|
for system_config in system_ruby system_gem_path system_user_gem_path ; do
|
524
|
-
"$
|
509
|
+
"$rvm_path/scripts/db" "$rvm_config_path/user" "$system_config" "delete"
|
525
510
|
done ; unset system_config variable
|
526
511
|
|
527
512
|
\rm -f $rvm_bin_path/ruby $rvm_bin_path/gem $rvm_bin_path/rake $rvm_bin_path/irb $rvm_bin_path/default*
|
@@ -532,25 +517,25 @@ __rvm_reset() {
|
|
532
517
|
# Implode removes the entire rvm installation under $rvm_path.
|
533
518
|
__rvm_implode() {
|
534
519
|
while : ; do
|
535
|
-
"$
|
520
|
+
"$rvm_path/scripts/log" "warn" "Are you SURE you wish for rvm to implode? This will remove $rvm_path ? (type 'yes' or 'no')"
|
536
521
|
|
537
522
|
read response
|
538
523
|
|
539
524
|
if [[ "yes" = "$response" ]] ; then
|
540
525
|
if [[ "/" = "$rvm_path" ]] ; then
|
541
|
-
"$
|
526
|
+
"$rvm_path/scripts/log" "error" "remove '/' ?!... Ni!"
|
542
527
|
else
|
543
528
|
if [[ -d "$rvm_path" ]] ; then
|
544
|
-
"$
|
529
|
+
"$rvm_path/scripts/log" "info" "Hai! Removing $rvm_path"
|
545
530
|
\rm -rf "$rvm_path/"
|
546
531
|
echo "$rvm_path has been removed."
|
547
532
|
else
|
548
|
-
"$
|
533
|
+
"$rvm_path/scripts/log" "info" "It appears that $rvm_path is already non existant."
|
549
534
|
fi
|
550
535
|
fi
|
551
536
|
break
|
552
537
|
elif [[ "no" = "$response" ]] ; then
|
553
|
-
"$
|
538
|
+
"$rvm_path/scripts/log" "info" "Cancelling implosion, no harm done :)"
|
554
539
|
break
|
555
540
|
fi
|
556
541
|
done
|
@@ -563,7 +548,7 @@ __rvm_source_dir() {
|
|
563
548
|
if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select ; fi
|
564
549
|
|
565
550
|
if [[ -z "$rvm_ruby_src_path" ]] ; then
|
566
|
-
"$
|
551
|
+
"$rvm_path/scripts/log" "fail" "No source directory exists for the default implementation."
|
567
552
|
else
|
568
553
|
echo "$rvm_ruby_src_path"
|
569
554
|
fi
|
@@ -596,7 +581,7 @@ __rvm_update() {
|
|
596
581
|
[[ ${rvm_bin_flag:-0} -eq 1 ]] && __rvm_bin_scripts
|
597
582
|
|
598
583
|
# Update to the latest rubygems.
|
599
|
-
[[ ${rvm_rubygems_flag:-0} -eq 1 ]] && "$
|
584
|
+
[[ ${rvm_rubygems_flag:-0} -eq 1 ]] && "$rvm_path/scripts/rubygems" current
|
600
585
|
|
601
586
|
)
|
602
587
|
unset rvm_update_flag rvm_action rvm_self_flag rvm_ruby_revision rvm_bin_flag rvm_rubygems_flag
|
@@ -620,7 +605,7 @@ __rvm_update_rvm() {
|
|
620
605
|
else
|
621
606
|
stable_version="$(curl -s http://rvm.beginrescueend.com/releases/stable-version.txt)"
|
622
607
|
|
623
|
-
__rvm_run "fetch" "$
|
608
|
+
__rvm_run "fetch" "$rvm_path/scripts/fetch 'http://rvm.beginrescueend.com/releases/rvm-${stable_version}.tar.gz'" "fetching rvm-${stable_version}.tar.gz"
|
624
609
|
|
625
610
|
__rvm_run "extract" "gunzip < \"$rvm_archives_path/rvm-${stable_version}.tar.gz\" | tar xf - -C $rvm_src_path" "Extracting rvm-${stable_version}.tar.gz ..."
|
626
611
|
|
@@ -628,13 +613,13 @@ __rvm_update_rvm() {
|
|
628
613
|
fi
|
629
614
|
)
|
630
615
|
|
631
|
-
rvm_hook="after_update" ; source "$
|
616
|
+
rvm_hook="after_update" ; source "$rvm_path/scripts/hook"
|
632
617
|
|
633
618
|
return 0
|
634
619
|
}
|
635
620
|
|
636
621
|
__rvm_reboot() {
|
637
|
-
"$
|
622
|
+
"$rvm_path/scripts/log" "warn" "Do you wish to reboot rvm? ('yes', or 'no')"
|
638
623
|
|
639
624
|
local response="no"
|
640
625
|
|
@@ -648,7 +633,7 @@ __rvm_reboot() {
|
|
648
633
|
mv "$rvm_path/archives" "$HOME/.archives"
|
649
634
|
|
650
635
|
if [[ "/" = "$rvm_path" ]] ; then
|
651
|
-
"$
|
636
|
+
"$rvm_path/scripts/log" "error" "remove '/' ?!... NO!"
|
652
637
|
else
|
653
638
|
if [[ -d "$rvm_path" ]] ; then \rm -rf "$rvm_path/" ; fi
|
654
639
|
fi
|
@@ -659,7 +644,7 @@ __rvm_reboot() {
|
|
659
644
|
|
660
645
|
source "$rvm_path/scripts/rvm"
|
661
646
|
else
|
662
|
-
"$
|
647
|
+
"$rvm_path/scripts/log" "info" "Carry on then..."
|
663
648
|
fi
|
664
649
|
|
665
650
|
return 0
|
@@ -668,7 +653,7 @@ __rvm_reboot() {
|
|
668
653
|
# Create the irbrc for the currently selected ruby installation.
|
669
654
|
__rvm_irbrc() {
|
670
655
|
if [[ -d "$rvm_ruby_home" && ! -s "$rvm_ruby_irbrc" ]] ; then
|
671
|
-
\cp "$
|
656
|
+
\cp "$rvm_path/scripts/irbrc" "$rvm_ruby_irbrc"
|
672
657
|
fi
|
673
658
|
return $?
|
674
659
|
}
|
@@ -706,7 +691,7 @@ __rvm_inspect() {
|
|
706
691
|
for binary in $rvm_ruby_args ; do
|
707
692
|
actual_file="$(command -v $binary)"
|
708
693
|
|
709
|
-
"$
|
694
|
+
"$rvm_path/scripts/log" "info" "$actual_file:"
|
710
695
|
|
711
696
|
if [[ $rvm_shebang_flag -eq 1 ]] ; then \head -n 1 < "$actual_file" ; fi
|
712
697
|
if [[ $rvm_env_flag -eq 1 ]] ; then \awk '/ENV/' < "$actual_file" ; fi
|
@@ -814,7 +799,7 @@ __rvm_ensure_has_environment_files() {
|
|
814
799
|
if [[ ! -L "$directory_name" && ! -d "$directory_name" ]]; then
|
815
800
|
\mkdir -p "$directory_name"
|
816
801
|
|
817
|
-
"$
|
802
|
+
"$rvm_path/scripts/wrapper" "$wrapper_identifier" &> /dev/null
|
818
803
|
fi
|
819
804
|
rvm_creating_default_wrappers=0
|
820
805
|
done
|
@@ -829,7 +814,7 @@ __rvm_strip() {
|
|
829
814
|
}
|
830
815
|
|
831
816
|
__rvm_using_gemset_globalcache() {
|
832
|
-
"$
|
817
|
+
"$rvm_path/scripts/db" "$rvm_config_path/user" "use_gemset_globalcache" | \grep -q '^true$'
|
833
818
|
return $?
|
834
819
|
}
|
835
820
|
|
@@ -896,27 +881,27 @@ __rvm_rvmrc_key() {
|
|
896
881
|
|
897
882
|
__rvm_reset_rvmrc_trust() {
|
898
883
|
touch "$rvm_config_path/rvmrcs"
|
899
|
-
"$
|
884
|
+
"$rvm_path/scripts/db" "$rvm_config_path/rvmrcs" "$(__rvm_rvmrc_key "$1")" "delete" >/dev/null 2>&1
|
900
885
|
return $?
|
901
886
|
}
|
902
887
|
|
903
888
|
__rvm_trust_rvmrc() {
|
904
889
|
touch "$rvm_config_path/rvmrcs"
|
905
890
|
__rvm_reset_rvmrc_trust "$1"
|
906
|
-
"$
|
891
|
+
"$rvm_path/scripts/db" "$rvm_config_path/rvmrcs" "$(__rvm_rvmrc_key "$1")" "1" >/dev/null 2>&1
|
907
892
|
return $?
|
908
893
|
}
|
909
894
|
|
910
895
|
__rvm_untrust_rvmrc() {
|
911
896
|
touch "$rvm_config_path/rvmrcs"
|
912
897
|
__rvm_reset_rvmrc_trust "$1"
|
913
|
-
"$
|
898
|
+
"$rvm_path/scripts/db" "$rvm_config_path/rvmrcs" "$(__rvm_rvmrc_key "$1")" "0" >/dev/null 2>&1
|
914
899
|
return $?
|
915
900
|
}
|
916
901
|
|
917
902
|
__rvm_rvmrc_stored_trust() {
|
918
903
|
touch "$rvm_config_path/rvmrcs"
|
919
|
-
"$
|
904
|
+
"$rvm_path/scripts/db" "$rvm_config_path/rvmrcs" "$(__rvm_rvmrc_key "$1")"
|
920
905
|
return $?
|
921
906
|
}
|
922
907
|
|
@@ -1089,7 +1074,7 @@ __rvm_record_install() {
|
|
1089
1074
|
|
1090
1075
|
[[ -z "$1" ]] && return
|
1091
1076
|
|
1092
|
-
recorded_ruby_name="$($
|
1077
|
+
recorded_ruby_name="$($rvm_path/scripts/tools strings "$1")"
|
1093
1078
|
|
1094
1079
|
rvm_install_record_file="$rvm_config_path/installs"
|
1095
1080
|
|
@@ -1113,7 +1098,7 @@ __rvm_record_install() {
|
|
1113
1098
|
__rvm_remove_install_record() {
|
1114
1099
|
local recorded_ruby_name rvm_install_record_file
|
1115
1100
|
|
1116
|
-
recorded_ruby_name="$($
|
1101
|
+
recorded_ruby_name="$($rvm_path/scripts/tools strings "$1")"
|
1117
1102
|
|
1118
1103
|
rvm_install_record_file="$rvm_config_path/installs"
|
1119
1104
|
|
@@ -1133,7 +1118,7 @@ __rvm_recorded_install_command() {
|
|
1133
1118
|
|
1134
1119
|
local recorded_ruby_name recorded_ruby_match
|
1135
1120
|
|
1136
|
-
recorded_ruby_name="$($
|
1121
|
+
recorded_ruby_name="$($rvm_path/scripts/tools strings "$1" | awk -F"${rvm_gemset_separator:-"@"}" '{print $1}')"
|
1137
1122
|
|
1138
1123
|
[[ -z "$recorded_ruby_name" ]] && return 1
|
1139
1124
|
|
@@ -1168,20 +1153,20 @@ __rvm_expand_ruby_string() {
|
|
1168
1153
|
local string="$1"
|
1169
1154
|
|
1170
1155
|
if [[ -z "$string" || "$string" = "all" ]]; then
|
1171
|
-
"$
|
1156
|
+
"$rvm_path/scripts/list" strings | tr ' ' "\n"
|
1172
1157
|
|
1173
1158
|
elif [[ "$string" = "all-gemsets" ]]; then
|
1174
|
-
"$
|
1159
|
+
"$rvm_path/scripts/list" gemsets strings
|
1175
1160
|
|
1176
1161
|
elif [[ "$string" = "default-with-rvmrc" || "$string" = "rvmrc" ]]; then
|
1177
|
-
"$
|
1162
|
+
"$rvm_path/scripts/tools" path-identifier "$PWD"
|
1178
1163
|
|
1179
1164
|
elif [[ "$string" == "all-rubies" || "$string" = "rubies" ]]; then
|
1180
|
-
"$
|
1165
|
+
"$rvm_path/scripts/list" rubies strings
|
1181
1166
|
|
1182
1167
|
elif [[ "$string" == "current-ruby" || "$string" = "gemsets" ]]; then
|
1183
|
-
local current_ruby="$(__rvm_environment_identifier | awk -F"$rvm_gemset_separator" '{print $string}')"
|
1184
|
-
rvm_silence_logging=1 "$
|
1168
|
+
local current_ruby="$(__rvm_environment_identifier | awk -F"${rvm_gemset_separator:-"@"}" '{print $string}')"
|
1169
|
+
rvm_silence_logging=1 "$rvm_path/scripts/gemsets" list | sed "s/^/$current_ruby${rvm_gemset_separator:-"@"}/"
|
1185
1170
|
|
1186
1171
|
elif [[ "$string" = "current" ]]; then
|
1187
1172
|
__rvm_environment_identifier
|