rvm 0.1.43 → 0.1.44
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/binscripts/rvm +25 -14
- data/binscripts/rvm-auto-ruby +18 -0
- data/binscripts/rvm-prompt +6 -0
- data/binscripts/rvm-shell +14 -12
- data/binscripts/rvm-update-head +6 -2
- data/binscripts/rvm-update-latest +5 -2
- data/binscripts/rvmsudo +8 -1
- data/config/db +1 -1
- data/config/known +1 -1
- data/config/md5 +4 -4
- data/contrib/gemset_snapshot +1 -1
- data/contrib/install-system-wide +12 -10
- data/gemsets/default.gems +0 -1
- data/gemsets/global.gems +0 -1
- data/install +38 -31
- data/lib/VERSION.yml +1 -1
- data/rvm.gemspec +5 -2
- data/scripts/cd +4 -0
- data/scripts/cli +21 -19
- data/scripts/completion +32 -26
- data/scripts/environment-convertor +60 -0
- data/scripts/gemsets +23 -14
- data/scripts/help +1 -1
- data/scripts/info +6 -6
- data/scripts/initialize +11 -13
- data/scripts/install +38 -31
- data/scripts/irbrc.rb +5 -0
- data/scripts/list +7 -8
- data/scripts/maglev +1 -1
- data/scripts/manage +37 -24
- data/scripts/manpages +1 -1
- data/scripts/notes +2 -0
- data/scripts/repair +66 -0
- data/scripts/rubygems +5 -0
- data/scripts/rvm +25 -12
- data/scripts/rvm-install +38 -31
- data/scripts/selector +160 -33
- data/scripts/set +2 -2
- data/scripts/snapshot +1 -1
- data/scripts/update +38 -31
- data/scripts/utility +87 -179
- metadata +7 -4
data/scripts/cd
CHANGED
@@ -11,13 +11,17 @@ if [[ "$rvm_project_rvmrc" -ne 0 ]] ; then
|
|
11
11
|
else
|
12
12
|
cd() {
|
13
13
|
builtin cd "$@"
|
14
|
+
result=$?
|
14
15
|
__rvm_project_rvmrc
|
16
|
+
return $result
|
15
17
|
}
|
16
18
|
fi
|
17
19
|
else
|
18
20
|
cd() {
|
19
21
|
builtin cd "$@"
|
22
|
+
result=$?
|
20
23
|
__rvm_project_rvmrc
|
24
|
+
return $result
|
21
25
|
}
|
22
26
|
fi
|
23
27
|
fi
|
data/scripts/cli
CHANGED
@@ -114,12 +114,18 @@ __rvm_parse_args() {
|
|
114
114
|
if [[ "user" = "$1" ]] ; then rvm_user_flag=1 ; shift ; fi
|
115
115
|
;;
|
116
116
|
|
117
|
-
|
117
|
+
inspect|list|info)
|
118
118
|
rvm_action="$rvm_token"
|
119
119
|
rvm_ruby_args="$@"
|
120
120
|
rvm_parse_break=1
|
121
121
|
;;
|
122
122
|
|
123
|
+
docs|alias|rubygems)
|
124
|
+
rvm_action="$rvm_token"
|
125
|
+
rvm_ruby_args="$(__rvm_quote_args "$@")"
|
126
|
+
rvm_parse_break=1
|
127
|
+
;;
|
128
|
+
|
123
129
|
-S)
|
124
130
|
rvm_action="ruby"
|
125
131
|
rvm_ruby_args="$rvm_token $(__rvm_quote_args "$@")"
|
@@ -132,7 +138,7 @@ __rvm_parse_args() {
|
|
132
138
|
rvm_parse_break=1
|
133
139
|
;;
|
134
140
|
|
135
|
-
exec|cleanup|tools|disk-usage|snapshot)
|
141
|
+
exec|cleanup|tools|disk-usage|snapshot|repair)
|
136
142
|
rvm_action="$rvm_token"
|
137
143
|
rvm_ruby_args="$(__rvm_quote_args "$@")"
|
138
144
|
rvm_parse_break=1
|
@@ -178,7 +184,7 @@ __rvm_parse_args() {
|
|
178
184
|
unset rvm_ruby_strings
|
179
185
|
else
|
180
186
|
if $rvm_scripts_path/match "$1" "^[0-9]" ; then
|
181
|
-
rvm_ruby_strings=$(echo "$1" | tr ',' ' ') ; shift
|
187
|
+
rvm_ruby_strings=$(echo "$1" | \tr ',' ' ') ; shift
|
182
188
|
unset rvm_ruby_interpreter
|
183
189
|
else
|
184
190
|
if $rvm_scripts_path/match "ruby rbx jruby macruby ree rubinius maglev mput shyouhei ironruby" "$1" ; then
|
@@ -217,7 +223,7 @@ __rvm_parse_args() {
|
|
217
223
|
|
218
224
|
--ree-options)
|
219
225
|
if [[ ! -z "$1" ]] ; then
|
220
|
-
export rvm_ree_options="$(echo $1 | tr ',' ' ')" ; shift
|
226
|
+
export rvm_ree_options="$(echo $1 | \tr ',' ' ')" ; shift
|
221
227
|
else
|
222
228
|
rvm_action="error"
|
223
229
|
rvm_error_message="--ree-options *must* be followed by... well... options."
|
@@ -279,7 +285,7 @@ __rvm_parse_args() {
|
|
279
285
|
|
280
286
|
--alias)
|
281
287
|
if [[ -n "$1" ]]; then
|
282
|
-
export rvm_ruby_aliases="$(echo "$1" | tr ',' ' ')"
|
288
|
+
export rvm_ruby_aliases="$(echo "$1" | \tr ',' ' ')"
|
283
289
|
shift
|
284
290
|
fi
|
285
291
|
;;
|
@@ -300,9 +306,9 @@ __rvm_parse_args() {
|
|
300
306
|
;;
|
301
307
|
|
302
308
|
-h|--help|usage) rvm_action=help ;;
|
303
|
-
-G)
|
304
|
-
--source)
|
305
|
-
--archives)
|
309
|
+
-G) path_variable="rvm_gems_path" ; __rvm_set_path_variable ; shift ;;
|
310
|
+
--source) path_variable="rvm_src_path" ; __rvm_set_path_variable ; shift ;;
|
311
|
+
--archives) path_variable="rvm_archives_path" ; __rvm_set_path_variable ; shift ;;
|
306
312
|
--make) rvm_ruby_make="$1" ; shift ;;
|
307
313
|
--make-install) rvm_ruby_make_install="$1" ; shift ;;
|
308
314
|
--nice) rvm_niceness="$1" ; shift ;;
|
@@ -316,17 +322,16 @@ __rvm_parse_args() {
|
|
316
322
|
--disable-llvm|--disable-jit) rvm_llvm_flag=0 ;;
|
317
323
|
--enable-llvm|--enable-jit) rvm_llvm_flag=1 ;;
|
318
324
|
|
319
|
-
--name)
|
320
|
-
rvm_ruby_name="$1"
|
321
|
-
shift
|
322
|
-
;;
|
323
|
-
|
324
325
|
reboot|damnit|wtf|argh|BOOM|boom|wth) $rvm_action="reboot" ;;
|
325
326
|
|
326
327
|
--self|--gem|--rubygems|--reconfigure|--default|--debug|--force|--export|--summary|--latest|--yaml|--json|--archive|--shebang|--env|--path|--tail|--delete|--verbose|--import|--rvmrc|--sticky|--create|--rvmrc|--gems|--docs)
|
327
328
|
export rvm_$(echo $rvm_token | sed 's#-##g')_flag=1
|
328
329
|
;;
|
329
330
|
|
331
|
+
--dump-environment)
|
332
|
+
export rvm_dump_environment_flag="$1"; shift
|
333
|
+
;;
|
334
|
+
|
330
335
|
--clang)
|
331
336
|
export rvm_clang_flag=1
|
332
337
|
export rvm_prior_cc="$CC"
|
@@ -461,7 +466,7 @@ rvm() {
|
|
461
466
|
fi
|
462
467
|
|
463
468
|
# Check that this is the current version.
|
464
|
-
disk_version=$(cat "${rvm_path:-$HOME/.rvm}/lib/VERSION.yml" | tail -n 3 | sed 's/^.*: //g' | tr "\n" '.' | sed 's/\.$//')
|
469
|
+
disk_version=$(cat "${rvm_path:-$HOME/.rvm}/lib/VERSION.yml" | tail -n 3 | sed 's/^.*: //g' | \tr "\n" '.' | sed 's/\.$//')
|
465
470
|
if [[ "${rvm_version}" != "${disk_version}" ]] && [[ "reload" != "$1" ]]; then
|
466
471
|
printf "\nA RVM version ${disk_version} is installed yet ${rvm_version} is loaded.\n Please do one of the following:\n * 'rvm reload'\n * open a new shell\n * source your shell init scripts"
|
467
472
|
return 1
|
@@ -501,10 +506,7 @@ rvm() {
|
|
501
506
|
fi
|
502
507
|
result=$?
|
503
508
|
;;
|
504
|
-
docs) $rvm_scripts_path/docs $rvm_ruby_args ; result=$? ;;
|
505
|
-
alias) $rvm_scripts_path/alias $rvm_ruby_args ; result=$? ;;
|
506
509
|
help) $rvm_scripts_path/help $rvm_ruby_args ; result=$? ;;
|
507
|
-
rubygems) $rvm_scripts_path/rubygems $rvm_ruby_args ; result=$? ;;
|
508
510
|
|
509
511
|
answer) __rvm_Answer_to_the_Ultimate_Question_of_Life_the_Universe_and_Everything ; result=42 ;;
|
510
512
|
question) __rvm_ultimate_question ; result=42 ;;
|
@@ -521,7 +523,7 @@ rvm() {
|
|
521
523
|
;;
|
522
524
|
|
523
525
|
gemdir|gemhome|gempath)
|
524
|
-
$rvm_scripts_path/gemsets $rvm_action
|
526
|
+
$rvm_scripts_path/gemsets "$rvm_action"
|
525
527
|
result=$?
|
526
528
|
;;
|
527
529
|
|
@@ -536,7 +538,7 @@ rvm() {
|
|
536
538
|
unset old_rvm_ruby_string
|
537
539
|
;;
|
538
540
|
|
539
|
-
cleanup|tools|snapshot|disk-usage)
|
541
|
+
cleanup|tools|snapshot|disk-usage|repair|alias|docs|rubygems)
|
540
542
|
__rvm_run_script "$rvm_action"
|
541
543
|
result=$?
|
542
544
|
;;
|
data/scripts/completion
CHANGED
@@ -41,27 +41,7 @@ _rvm_commands ()
|
|
41
41
|
version use reload implode update reset info debug\
|
42
42
|
install uninstall remove\
|
43
43
|
ruby gem rake tests specs monitor gemset\
|
44
|
-
gemdir srcdir fetch list package notes'
|
45
|
-
|
46
|
-
RVM_OPTS='\
|
47
|
-
-v --version\
|
48
|
-
-h --help\
|
49
|
-
-l --level\
|
50
|
-
--tag\
|
51
|
-
--rev\
|
52
|
-
--prefix\
|
53
|
-
--bin\
|
54
|
-
--source\
|
55
|
-
--archives\
|
56
|
-
-S --script\
|
57
|
-
-G --gems\
|
58
|
-
-C --configure\
|
59
|
-
--reconfigure\
|
60
|
-
--make\
|
61
|
-
--make-install\
|
62
|
-
--nice\
|
63
|
-
-m --gem-set\
|
64
|
-
--rm-gem-set'
|
44
|
+
gemdir srcdir fetch list package notes snapshot'
|
65
45
|
|
66
46
|
case "${cur}" in
|
67
47
|
-*) _rvm_opts ;;
|
@@ -71,11 +51,37 @@ _rvm_commands ()
|
|
71
51
|
|
72
52
|
_rvm_opts ()
|
73
53
|
{
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
54
|
+
RVM_OPTS='\
|
55
|
+
-h\
|
56
|
+
--help\
|
57
|
+
-v\
|
58
|
+
--version\
|
59
|
+
-l --level\
|
60
|
+
--prefix\
|
61
|
+
--bin\
|
62
|
+
--gems\
|
63
|
+
--archive\
|
64
|
+
--patch
|
65
|
+
-S\
|
66
|
+
-e\
|
67
|
+
-G\
|
68
|
+
-C\
|
69
|
+
--configure\
|
70
|
+
--nice\
|
71
|
+
--ree-options\
|
72
|
+
--head\
|
73
|
+
--rubygems\
|
74
|
+
--default\
|
75
|
+
--debug\
|
76
|
+
--trace\
|
77
|
+
--force\
|
78
|
+
--summary\
|
79
|
+
--latest\
|
80
|
+
--docs\
|
81
|
+
--reconfigure
|
82
|
+
--create'
|
83
|
+
|
84
|
+
__rvm_comp "$RVM_OPTS"
|
79
85
|
}
|
80
86
|
|
81
87
|
_rvm_use ()
|
@@ -0,0 +1,60 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
# Usage: $rvm_scripts_path/environment-convertor <shell> <environment>
|
4
|
+
|
5
|
+
unset GREP_COLOR
|
6
|
+
unset GREP_OPTIONS
|
7
|
+
|
8
|
+
source "$rvm_scripts_path/base"
|
9
|
+
|
10
|
+
convert_path_to_fish() {
|
11
|
+
local path_part="$1"
|
12
|
+
local parts="$(echo "$path_part" | sed -e 's#:\$PATH##' -e "s#:#\" \"#g" -e "s#^export \\([^[:space:]]*\\)=##")"
|
13
|
+
echo "for path_part in $parts"
|
14
|
+
echo ' if test -d $path_part'
|
15
|
+
echo ' set PATH $path_parth $PATH'
|
16
|
+
echo ' end'
|
17
|
+
echo 'end'
|
18
|
+
}
|
19
|
+
|
20
|
+
convert_unset_to_fish() {
|
21
|
+
sed 's#^unset #set -e #'
|
22
|
+
}
|
23
|
+
|
24
|
+
convert_exports_to_fish() {
|
25
|
+
sed -e "s#:#' '#g" -e "s#^\\(export \\)\\{0,1\\}\\([^[:space:]]*\\)=#set -x \\2 #"
|
26
|
+
}
|
27
|
+
|
28
|
+
contents_of_environment_file() {
|
29
|
+
cat "$rvm_environments_path/$(__rvm_environment_identifier)"
|
30
|
+
}
|
31
|
+
|
32
|
+
convert_to_shell() {
|
33
|
+
convert_path_to_fish "$(contents_of_environment_file | grep '^export PATH=')"
|
34
|
+
while read -r shell_line; do
|
35
|
+
if echo "$shell_line" | grep -q '^unset '; then
|
36
|
+
echo "$shell_line" | convert_unset_to_fish
|
37
|
+
else
|
38
|
+
echo "$shell_line" | convert_exports_to_fish
|
39
|
+
fi
|
40
|
+
done < <(contents_of_environment_file | grep -v '^export [^=]*$' | grep -v '^export PATH=')
|
41
|
+
unset shell_line
|
42
|
+
}
|
43
|
+
|
44
|
+
ensure_has_shell() {
|
45
|
+
for item in "path" "unset" "exports"; do
|
46
|
+
command -v "convert_${item}_to_${1}" >/dev/null || return 1
|
47
|
+
done; unset item
|
48
|
+
}
|
49
|
+
|
50
|
+
shell_name="$1"
|
51
|
+
environment_name="${2:-"$(__rvm_environment_identifier)"}"
|
52
|
+
|
53
|
+
[[ -n "$shell_name" && -n "$environment_name" ]] || exit 1
|
54
|
+
ensure_has_shell "$shell_name" || exit 1
|
55
|
+
# Check we're loading a different shell.
|
56
|
+
if [[ "$(__rvm_environment_identifier)" != "$environment_name" ]]; then
|
57
|
+
__rvm_become "$environment_name" || exit 1
|
58
|
+
fi
|
59
|
+
|
60
|
+
convert_to_shell
|
data/scripts/gemsets
CHANGED
@@ -16,7 +16,7 @@ usage() {
|
|
16
16
|
gemset_update() {
|
17
17
|
if [[ -z "$rvm_ruby_strings" ]]; then
|
18
18
|
$rvm_scripts_path/log "info" "Running gem update for all rubies and gemsets."
|
19
|
-
rvm_ruby_strings="$(\ls "$rvm_gems_path" | grep -v '^\(doc\|cache\|@\|system\)' | tr '\n' ',')"
|
19
|
+
rvm_ruby_strings="$(\ls "$rvm_gems_path" | grep -v '^\(doc\|cache\|@\|system\)' | \tr '\n' ',')"
|
20
20
|
else
|
21
21
|
$rvm_scripts_path/log "info" "Running gem update for the specified rubies."
|
22
22
|
fi
|
@@ -154,16 +154,27 @@ gemset_empty() {
|
|
154
154
|
|
155
155
|
# Migrate gemsets from ruby X to ruby Y
|
156
156
|
gemset_copy() {
|
157
|
-
source_ruby="$(echo $gems_args | awk '{print $1}')"
|
158
|
-
destination_ruby="$(echo $gems_args | awk '{print $2}')"
|
159
|
-
|
157
|
+
local source_ruby="$(echo "$gems_args" | awk '{print $1}')"
|
158
|
+
local destination_ruby="$(echo "$gems_args" | awk '{print $2}')"
|
159
|
+
|
160
|
+
if [[ -z "$destination_ruby" || -z "$source_ruby" ]] ; then
|
160
161
|
$rvm_scripts_path/log "error" "Source and destination must be specified: 'rvm gemset copy X Y'"
|
162
|
+
return 1
|
161
163
|
fi
|
162
|
-
|
163
|
-
|
164
|
+
|
165
|
+
local source_path="$(rvm_silence_logging=1 rvm "$source_ruby" gem env gemdir)"
|
166
|
+
local destination_path="$(rvm_silence_logging=1 rvm "$destination_ruby" gem env gemdir)"
|
167
|
+
|
168
|
+
if [[ -z "$source_path" ]]; then
|
169
|
+
$rvm_scripts_path/log "error" "Unable to expand ruby '$source_ruby'"
|
170
|
+
return 1
|
164
171
|
fi
|
165
|
-
|
166
|
-
|
172
|
+
|
173
|
+
if [[ -z "$destination_path" ]]; then
|
174
|
+
$rvm_scripts_path/log "error" "Unable to expand ruby '$destination_ruby'"
|
175
|
+
return 1
|
176
|
+
fi
|
177
|
+
|
167
178
|
if [[ -d "$source_path" ]] ; then
|
168
179
|
if [[ ! -d "$destination_path" ]] ; then mkdir -p $destination_path ; fi
|
169
180
|
$rvm_scripts_path/log "info" "Copying gemset from $source_ruby to $destination_ruby"
|
@@ -177,8 +188,6 @@ gemset_copy() {
|
|
177
188
|
$rvm_scripts_path/log "error" "Gems directory does not exist for $source_path ($source_path)"
|
178
189
|
return 1
|
179
190
|
fi
|
180
|
-
|
181
|
-
unset source_ruby destination_ruby source_path destination_path
|
182
191
|
}
|
183
192
|
|
184
193
|
gemset_export() {
|
@@ -202,7 +211,7 @@ gemset_export() {
|
|
202
211
|
|
203
212
|
touch $rvm_file_name
|
204
213
|
echo "# $rvm_file_name generated gem export file. Note that any env variable settings will be missing. Append these after using a ';' field separator" > $rvm_file_name
|
205
|
-
for gem in $(gem list | sed 's#[\(|\)]##g' | sed 's#, #,#g' | tr ' ' ';') ; do
|
214
|
+
for gem in $(gem list | sed 's#[\(|\)]##g' | sed 's#, #,#g' | \tr ' ' ';') ; do
|
206
215
|
name="$(echo $gem | awk -F';' '{print $1}')"
|
207
216
|
if [[ -z "$rvm_latest_flag" ]] ; then
|
208
217
|
versions="$(echo $gem | awk -F';' '{print $2}' | sed 's#,# #g')"
|
@@ -381,7 +390,7 @@ gemset_prune() {
|
|
381
390
|
$rvm_scripts_path/log "info" "Moving active gems into temporary cache..."
|
382
391
|
while read -r used_gem; do
|
383
392
|
gem_name="$(echo "$used_gem" | sed -e 's/ .*//')"
|
384
|
-
versions="$(echo "$used_gem" | sed -e 's/.* (//' -e 's/)//' | tr ', ' ' ')"
|
393
|
+
versions="$(echo "$used_gem" | sed -e 's/.* (//' -e 's/)//' | \tr ', ' ' ')"
|
385
394
|
for version in $versions; do
|
386
395
|
cached_gem_name="${gem_name}-${version}.gem"
|
387
396
|
cached_file_path="${live_cache_path}/${cached_gem_name}"
|
@@ -403,7 +412,7 @@ gemset_pristine() {
|
|
403
412
|
# Loads the default gemsets for the current interpreter and gemset.
|
404
413
|
gemset_initial() {
|
405
414
|
$rvm_scripts_path/log "info" "Importing initial gemsets for $(__rvm_environment_identifier)."
|
406
|
-
mkdir -p "$rvm_gemsets_path/$(echo "$rvm_ruby_string" | tr '-' '/')" 2>/dev/null
|
415
|
+
mkdir -p "$rvm_gemsets_path/$(echo "$rvm_ruby_string" | \tr '-' '/')" 2>/dev/null
|
407
416
|
for gemsets_path in $(__rvm_ruby_string_paths_under "$rvm_gemsets_path") ; do
|
408
417
|
if [[ -n "$rvm_gemset_name" ]] ; then
|
409
418
|
if [[ -s "${gemsets_path}/${rvm_gemset_name}.gems" ]] ; then
|
@@ -437,7 +446,7 @@ if [[ "import" = "$action" ]] || [[ "load" = "$action" ]] ; then
|
|
437
446
|
gemset_import
|
438
447
|
else
|
439
448
|
original_env="$(__rvm_environment_identifier)"
|
440
|
-
for rvm_ruby_string in $(echo "$rvm_ruby_strings" | tr "," " "); do
|
449
|
+
for rvm_ruby_string in $(echo "$rvm_ruby_strings" | \tr "," " "); do
|
441
450
|
__rvm_become
|
442
451
|
gemset_import
|
443
452
|
done
|
data/scripts/help
CHANGED
@@ -17,7 +17,7 @@ if [[ ! -z "$command" ]] && [[ -s "${rvm_help_path}/${command}" ]] ; then
|
|
17
17
|
fi
|
18
18
|
else
|
19
19
|
cat "${rvm_path:-$HOME/.rvm}/README" | ${PAGER:-less}
|
20
|
-
$rvm_scripts_path/log "info" "\nCommands available with 'rvm help':\n\n $(builtin cd "${rvm_help_path}" ; \ls | tr "\n" ' ')"
|
20
|
+
$rvm_scripts_path/log "info" "\nCommands available with 'rvm help':\n\n $(builtin cd "${rvm_help_path}" ; \ls | \tr "\n" ' ')"
|
21
21
|
fi
|
22
22
|
|
23
23
|
$rvm_scripts_path/log "info" "\nFor additional information please visit RVM's documentation website:\n\n http://rvm.beginrescueend.com/"
|
data/scripts/info
CHANGED
@@ -22,7 +22,7 @@ info_system() {
|
|
22
22
|
|
23
23
|
info_rvm() {
|
24
24
|
rvm_info="$rvm_info\n rvm:"
|
25
|
-
rvm_info="$rvm_info\n version: \"$(__rvm_version | tr "\n" ' ' | __rvm_strip)\""
|
25
|
+
rvm_info="$rvm_info\n version: \"$(__rvm_version | \tr "\n" ' ' | __rvm_strip)\""
|
26
26
|
rvm_info="$rvm_info\n"
|
27
27
|
}
|
28
28
|
|
@@ -82,11 +82,11 @@ info_debug() {
|
|
82
82
|
if [[ "Darwin" = "$(uname)" ]] ; then
|
83
83
|
rvm_info="$rvm_info\nuname -r: $(uname -r)"
|
84
84
|
rvm_info="$rvm_info\nuname -m: $(uname -m)"
|
85
|
-
rvm_info="$rvm_info\nsw_vers: $(sw_vers | tr "\n" ',')"
|
85
|
+
rvm_info="$rvm_info\nsw_vers: $(sw_vers | \tr "\n" ',')"
|
86
86
|
rvm_info="$rvm_info\nARCHFLAGS: $ARCHFLAGS"
|
87
87
|
rvm_info="$rvm_info\nLDFLAGS: $LDFLAGS"
|
88
88
|
rvm_info="$rvm_info\nCFLAGS: $CFLAGS"
|
89
|
-
rvm_info="$rvm_info\n/Developer/SDKs/*:$(/usr/bin/basename -a /Developer/SDKs/* | tr "\n" ',')"
|
89
|
+
rvm_info="$rvm_info\n/Developer/SDKs/*:$(/usr/bin/basename -a /Developer/SDKs/* | \tr "\n" ',')"
|
90
90
|
fi
|
91
91
|
|
92
92
|
for file_name in $(echo $rc_files) ; do
|
@@ -95,7 +95,7 @@ info_debug() {
|
|
95
95
|
fi
|
96
96
|
done
|
97
97
|
|
98
|
-
if [[ "
|
98
|
+
if [[ "$rvm_sandboxed" = "0" ]] ; then
|
99
99
|
debug_files="$rvm_config_path/alias $rvm_config_path/system $rvm_config_path/db /etc/rvmrc /etc/gemrc"
|
100
100
|
else
|
101
101
|
debug_files="$rvm_config_path/alias $rvm_config_path/system $rvm_config_path/db $HOME/.rvmrc $HOME/.gemrc"
|
@@ -111,7 +111,7 @@ info_debug() {
|
|
111
111
|
}
|
112
112
|
|
113
113
|
info_sections() {
|
114
|
-
for section in $(echo $sections | tr ',' ' ') ; do
|
114
|
+
for section in $(echo $sections | \tr ',' ' ') ; do
|
115
115
|
unset rvm_info ; "info_${section}" ; printf "$rvm_info"
|
116
116
|
done
|
117
117
|
}
|
@@ -132,7 +132,7 @@ if [[ -z "$ruby_strings" ]] ; then
|
|
132
132
|
printf "$(__rvm_environment_identifier):\n"
|
133
133
|
info_sections
|
134
134
|
else
|
135
|
-
for ruby_string in $(printf $ruby_strings | tr ',' ' ') ; do
|
135
|
+
for ruby_string in $(printf $ruby_strings | \tr ',' ' ') ; do
|
136
136
|
__rvm_become "$ruby_string"
|
137
137
|
printf "$(__rvm_environment_identifier):\n"
|
138
138
|
info_sections
|
data/scripts/initialize
CHANGED
@@ -1,24 +1,19 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
|
-
|
3
|
+
rvm_sandboxed="${rvm_sandboxed:-1}"
|
4
|
+
|
5
|
+
if [[ "$rvm_sandboxed" = "0" ]] ; then
|
6
|
+
rvm_bin_path="${rvm_bin_path:-"$rvm_prefix/bin"}"
|
7
|
+
rvm_man_path="${rvm_man_path:-"$rvm_prefix/share/man"}"
|
4
8
|
rvm_rc_files="${rvm_rc_files:-"/etc/profile /etc/zshenv"}"
|
5
9
|
else
|
10
|
+
rvm_man_path="${rvm_man_path:-"$rvm_path/man"}"
|
11
|
+
rvm_bin_path="${rvm_bin_path:-"$rvm_path/bin"}"
|
6
12
|
rvm_rc_files="${rvm_rc_files:-"$HOME/.bash_profile $HOME/.bashrc $HOME/.zshenv"}"
|
7
13
|
fi
|
8
14
|
|
9
15
|
[[ -n "$rvm_archflags" ]] && rvm_make_flags_flag=1
|
10
16
|
|
11
|
-
rvm_project_rvmrc="${rvm_project_rvmrc:-1}"
|
12
|
-
rvm_project_rvmrc_default="${rvm_project_rvmrc_default:-0}"
|
13
|
-
|
14
|
-
if [[ -n "$rvm_prefix" && "$rvm_prefix" != "$HOME/"* ]] || [[ "root" = "$(whoami)" ]] ; then
|
15
|
-
rvm_bin_path="${rvm_bin_path:-"/usr/local/bin"}"
|
16
|
-
rvm_man_path="${rvm_man_path:-"/usr/local/share/man"}"
|
17
|
-
else
|
18
|
-
rvm_man_path="${rvm_man_path:-"$rvm_path/man"}"
|
19
|
-
rvm_bin_path="${rvm_bin_path:-"$rvm_path/bin"}"
|
20
|
-
fi
|
21
|
-
|
22
17
|
rvm_archives_path="${rvm_archives_path:-"$rvm_path/archives"}"
|
23
18
|
rvm_src_path="${rvm_src_path:-"$rvm_path/src"}"
|
24
19
|
rvm_repo_path="${rvm_repo_path:-"$rvm_path/repos"}"
|
@@ -38,5 +33,8 @@ rvm_patches_path="${rvm_patches_path:-"$rvm_path/patches"}"
|
|
38
33
|
rvm_patchsets_path="${rvm_patchsets_path:-"$rvm_path/patchsets"}"
|
39
34
|
rvm_gemset_separator="${rvm_gemset_separator:-"@"}"
|
40
35
|
|
41
|
-
|
36
|
+
rvm_project_rvmrc="${rvm_project_rvmrc:-1}"
|
37
|
+
rvm_project_rvmrc_default="${rvm_project_rvmrc_default:-0}"
|
38
|
+
|
39
|
+
export rvm_path rvm_patches_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 rvm_gems_cache_path rvm_gemset_separator rvm_gemsets_path rvm_repo_path rvm_patchsets_path rvm_sandboxed
|
42
40
|
|