rvm 1.0.7 → 1.0.8
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-auto-ruby +6 -1
- data/binscripts/rvmsudo +22 -6
- data/config/db +1 -1
- data/config/known +1 -1
- data/config/md5 +4 -4
- data/examples/rvmrc +0 -4
- data/install +21 -23
- data/lib/VERSION.yml +1 -1
- data/rvm.gemspec +2 -2
- data/scripts/alias +22 -14
- data/scripts/base +6 -0
- data/scripts/cd +4 -5
- data/scripts/cli +22 -14
- data/scripts/docs +41 -13
- data/scripts/env +1 -1
- data/scripts/environment-convertor +1 -1
- data/scripts/fetch +139 -27
- data/scripts/gemsets +71 -23
- data/scripts/hook +2 -2
- data/scripts/info +13 -2
- data/scripts/initialize +3 -22
- data/scripts/install +21 -23
- data/scripts/list +21 -21
- data/scripts/log +2 -1
- data/scripts/manage +191 -142
- data/scripts/migrate +21 -12
- data/scripts/notes +1 -1
- data/scripts/package +41 -23
- data/scripts/repair +16 -10
- data/scripts/rubygems +68 -18
- data/scripts/rvm +22 -5
- data/scripts/rvm-install +21 -23
- data/scripts/selector +43 -44
- data/scripts/snapshot +55 -19
- data/scripts/update +21 -23
- data/scripts/upgrade +18 -5
- data/scripts/utility +269 -126
- data/scripts/wrapper +21 -8
- metadata +4 -4
data/binscripts/rvm-auto-ruby
CHANGED
@@ -2,18 +2,23 @@
|
|
2
2
|
|
3
3
|
if [[ -n "$rvm_path" && -s "$rvm_path/scripts/rvm" ]]; then
|
4
4
|
source "$rvm_path/scripts/rvm"
|
5
|
+
|
5
6
|
elif [[ -s "/usr/local/lib/rvm" ]]; then
|
6
7
|
source "/usr/local/lib/rvm"
|
8
|
+
|
7
9
|
elif [[ -s "$HOME/.rvm/scripts/rvm" ]]; then
|
8
10
|
source "$HOME/.rvm/scripts/rvm"
|
11
|
+
|
9
12
|
elif [[ -s "/usr/local/rvm/scripts/rvm" ]]; then
|
10
13
|
source "/usr/local/rvm/scripts/rvm"
|
14
|
+
|
11
15
|
else
|
12
16
|
echo "Unable to detect rvm, please manually set the rvm_path env variable." >&2
|
13
17
|
exit 1
|
14
18
|
fi
|
15
19
|
|
16
|
-
[[ -s "$
|
20
|
+
[[ -s "$rvm_path/environments/default" ]] && source "$rvm_path/environments/default"
|
21
|
+
|
17
22
|
rvm rvmrc load > /dev/null 2>&1
|
18
23
|
|
19
24
|
exec ruby "$@"
|
data/binscripts/rvmsudo
CHANGED
@@ -1,10 +1,26 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
|
+
case "$1" in
|
4
|
+
--trace) set -o xtrace ; shift ;;
|
5
|
+
--verbose) set -o verbose ; shift ;;
|
6
|
+
esac
|
7
|
+
|
3
8
|
prefix="PATH='$PATH'"
|
4
|
-
if [[ -n "${BUNDLE_PATH:-""}" ]] ; then prefix="BUNDLE_PATH='$BUNDLE_PATH' $prefix" ; fi
|
5
|
-
if [[ -n "${GEM_HOME:-""}" ]] ; then prefix="GEM_HOME='$GEM_HOME' $prefix" ; fi
|
6
|
-
if [[ -n "${GEM_PATH:-""}" ]] ; then prefix="GEM_PATH='$GEM_PATH' $prefix" ; fi
|
7
9
|
|
8
|
-
|
9
|
-
|
10
|
-
|
10
|
+
if [[ -n "${BUNDLE_PATH:-""}" ]] ; then
|
11
|
+
prefix="BUNDLE_PATH='$BUNDLE_PATH' $prefix"
|
12
|
+
fi
|
13
|
+
|
14
|
+
if [[ -n "${GEM_HOME:-""}" ]] ; then
|
15
|
+
prefix="GEM_HOME='$GEM_HOME' $prefix"
|
16
|
+
fi
|
17
|
+
|
18
|
+
if [[ -n "${GEM_PATH:-""}" ]] ; then
|
19
|
+
prefix="GEM_PATH='$GEM_PATH' $prefix"
|
20
|
+
fi
|
21
|
+
|
22
|
+
command="$prefix /usr/bin/env $@"
|
23
|
+
|
24
|
+
eval sudo $command
|
25
|
+
|
26
|
+
exit $?
|
data/config/db
CHANGED
@@ -46,7 +46,7 @@ macruby_version=0.6
|
|
46
46
|
macruby_url=http://www.macruby.org/files
|
47
47
|
macruby_repo_url=git://git.macruby.org/macruby/MacRuby.git
|
48
48
|
macruby_nightly_url=http://www.macruby.org/files/nightlies/macruby_nightly-latest.pkg
|
49
|
-
maglev_version=
|
49
|
+
maglev_version=24209
|
50
50
|
maglev_url=http://glass-downloads.gemstone.com/maglev
|
51
51
|
maglev_repo_url=git://github.com/MagLev/maglev.git
|
52
52
|
shyouhei_repo_url=git://github.com/shyouhei/ruby.git
|
data/config/known
CHANGED
data/config/md5
CHANGED
@@ -78,7 +78,7 @@ zlib-1.2.3.tar.gz=debc62758716a169df9f62e6ab2bc634
|
|
78
78
|
curl-7.19.7.tar.gz=ecb2e37e45c9933e2a963cabe03670ab
|
79
79
|
pkg-config-0.23.tar.gz=d922a88782b64441d06547632fd85744
|
80
80
|
ironruby-1.0.zip=7a92888837b3507355ed391dbfc0ab83
|
81
|
-
GemStone-
|
82
|
-
GemStone-
|
83
|
-
MagLev-
|
84
|
-
MagLev-
|
81
|
+
GemStone-24209.Darwin-i386.tar.gz=be17189f4a4a65622d8c3b8261091575
|
82
|
+
GemStone-24209.Linux-x86_64.tar.gz=bab53507337aafc0f118b4eb097831e0
|
83
|
+
MagLev-24209.Darwin-i386.tar.gz=93fd5b2d31e9a19dc49065ec8755a87f
|
84
|
+
MagLev-24209.Linux-x86_64.tar.gz=ecb1c6a94e5b272d7595e6aee673c668
|
data/examples/rvmrc
CHANGED
@@ -30,10 +30,6 @@
|
|
30
30
|
# interpreter/version%gemset
|
31
31
|
#export rvm_gems_path="$rvm_path/gems"
|
32
32
|
|
33
|
-
# Hooks Path
|
34
|
-
# This is where rvm rubs custom hook files from.
|
35
|
-
#export rvm_hooks_path="${rvm_hooks_path:-"$rvm_path/hooks"}"
|
36
|
-
|
37
33
|
# Temp Path
|
38
34
|
# This is where rvm stores all of its temporary files.
|
39
35
|
#export rvm_tmp_path="${rvm_tmp_path:-"$rvm_path/tmp"}"
|
data/install
CHANGED
@@ -194,9 +194,6 @@ question="\n<?>"
|
|
194
194
|
cwd="$PWD"
|
195
195
|
|
196
196
|
source_path="${source_path:-$cwd}"
|
197
|
-
rvm_archives_path="${rvm_archives_path:-"$rvm_path/archives"}"
|
198
|
-
rvm_src_path="${rvm_src_path:-"$rvm_path/src"}"
|
199
|
-
rvm_log_path="${rvm_log_path:-"$rvm_path/log"}"
|
200
197
|
|
201
198
|
if [[ "$rvm_selfcontained" = "0" ]] ; then
|
202
199
|
rvm_bin_path="${rvm_bin_path:-"${rvm_prefix}bin"}"
|
@@ -209,9 +206,6 @@ else
|
|
209
206
|
fi
|
210
207
|
|
211
208
|
rvm_gems_path="${rvm_gems_path:-"$rvm_path/gems"}"
|
212
|
-
rvm_rubies_path="${rvm_rubies_path:-"$rvm_path/rubies"}"
|
213
|
-
rvm_config_path="${rvm_config_path:-"$rvm_path/config"}"
|
214
|
-
rvm_hooks_path="${rvm_hooks_path:-"$rvm_path/hooks"}"
|
215
209
|
rvm_tmp_path="${rvm_tmp_path:-"$rvm_path/tmp"}"
|
216
210
|
|
217
211
|
printf "
|
@@ -230,7 +224,9 @@ else
|
|
230
224
|
|
231
225
|
fi
|
232
226
|
|
233
|
-
|
227
|
+
directories=( "${rvm_archives_path:-"$rvm_path/archives"}" "${rvm_src_path:-"$rvm_path/src"}" "${rvm_log_path:-"$rvm_path/log"}" "$rvm_bin_path" "${rvm_gems_path:-"$rvm_path/gems"}" "${rvm_rubies_path:-"$rvm_path/rubies"}" "$rvm_path/config" "${rvm_tmp_path:-"$rvm_path/tmp"}" )
|
228
|
+
|
229
|
+
for directory in "${directories[@]}" ; do
|
234
230
|
|
235
231
|
if [[ ! -d "$directory" ]] ; then
|
236
232
|
|
@@ -240,7 +236,9 @@ for directory in "$rvm_archives_path" "$rvm_src_path" "$rvm_log_path" "$rvm_bin_
|
|
240
236
|
|
241
237
|
done
|
242
238
|
|
243
|
-
|
239
|
+
files=(README LICENCE)
|
240
|
+
|
241
|
+
for file in "${files[@]}"; do
|
244
242
|
|
245
243
|
cp -f "$source_path/$file" "$rvm_path/"
|
246
244
|
|
@@ -265,8 +263,8 @@ for dir_name in config scripts examples lib hooks help patches; do
|
|
265
263
|
|
266
264
|
done
|
267
265
|
|
268
|
-
if [[ ! -s "$
|
269
|
-
echo '# Users settings file, overrides db file settings and persists across installs.' >> "$
|
266
|
+
if [[ ! -s "$rvm_path/config/user" ]] ; then
|
267
|
+
echo '# Users settings file, overrides db file settings and persists across installs.' >> "$rvm_path/config/user"
|
270
268
|
fi
|
271
269
|
|
272
270
|
scripts=(monitor match log install color db fetch log set package)
|
@@ -281,15 +279,17 @@ done
|
|
281
279
|
# Bin Scripts
|
282
280
|
#
|
283
281
|
# Cleanse and purge...
|
284
|
-
|
282
|
+
files=(rvm-prompt rvm rvmsudo rvm-shell rvm-auto-ruby)
|
283
|
+
|
284
|
+
for file in "${files[@]}" ; do
|
285
285
|
|
286
286
|
rm -f "$rvm_bin_path/$file"
|
287
287
|
|
288
|
-
cp -f "$source_path/binscripts/$file" $rvm_bin_path/
|
288
|
+
cp -f "$source_path/binscripts/$file" "${rvm_bin_path:-"$rvm_path/bin"}/"
|
289
289
|
|
290
290
|
done
|
291
291
|
|
292
|
-
chmod +x "$rvm_bin_path"/* # TODO: this is quite suboptimal.
|
292
|
+
chmod +x "${rvm_bin_path:-"$rvm_path/bin"}"/* # TODO: this is quite suboptimal.
|
293
293
|
|
294
294
|
#
|
295
295
|
# RC Files
|
@@ -389,17 +389,15 @@ fi
|
|
389
389
|
#
|
390
390
|
# Migrate ~/.rvm/ruby-X,jruby-X,... to ~/.rvm/rubies/ for 0.1.0.
|
391
391
|
#
|
392
|
-
|
393
|
-
|
394
|
-
mkdir -p "$rvm_rubies_path/"
|
392
|
+
mkdir -p "${rvm_rubies_path:-"$rvm_path/rubies"}/"
|
395
393
|
|
396
394
|
for ruby in $rvm_path/ruby-* $rvm_path/jruby-* $rvm_path/mput-* $rvm_path/rbx-* $rvm_path/maglev-* $rvm_path/ree-* ; do
|
397
395
|
|
398
396
|
if [[ -d "$ruby" ]] ; then
|
399
397
|
|
400
|
-
mv "$ruby" "$rvm_rubies_path/"
|
398
|
+
mv "$ruby" "${rvm_rubies_path:-"$rvm_path/rubies"}/"
|
401
399
|
|
402
|
-
new_path="$rvm_rubies_path/$(basename $ruby)"
|
400
|
+
new_path="${rvm_rubies_path:-"$rvm_path/rubies"}/$(basename $ruby)"
|
403
401
|
|
404
402
|
for file in gem rake ; do
|
405
403
|
|
@@ -468,9 +466,9 @@ for gemset in "$rvm_path"/gems/*\@ ; do
|
|
468
466
|
done
|
469
467
|
|
470
468
|
# Move from legacy defaults to the new, alias based system.
|
471
|
-
if [[ -s "$
|
469
|
+
if [[ -s "$rvm_path/config/default" ]]; then
|
472
470
|
|
473
|
-
original_version="$(basename "$(grep GEM_HOME "$
|
471
|
+
original_version="$(basename "$(grep GEM_HOME "$rvm_path/config/default" | awk -F"'" '{print $2}' | sed "s#\%#${rvm_gemset_separator:-"@"}#")")"
|
474
472
|
|
475
473
|
if [[ -n "$original_version" ]]; then
|
476
474
|
|
@@ -478,7 +476,7 @@ if [[ -s "$rvm_config_path/default" ]]; then
|
|
478
476
|
|
479
477
|
fi ; unset original_version
|
480
478
|
|
481
|
-
rm -rf "$
|
479
|
+
rm -rf "$rvm_path/config/default"
|
482
480
|
|
483
481
|
fi
|
484
482
|
|
@@ -487,11 +485,11 @@ fi
|
|
487
485
|
#
|
488
486
|
printf "\n Correct permissions for base binaries in $rvm_bin_path..."
|
489
487
|
|
490
|
-
mkdir -p "$rvm_bin_path"
|
488
|
+
mkdir -p "${rvm_bin_path:-"$rvm_path/bin"}"
|
491
489
|
|
492
490
|
for file in rvm rvmsudo rvm-shell rvm-auto-ruby ; do
|
493
491
|
|
494
|
-
[[ -s "$rvm_bin_path/$file" ]] && chmod +x "$rvm_bin_path/$file"
|
492
|
+
[[ -s "${rvm_bin_path:-"$rvm_path/bin"}/$file" ]] && chmod +x "${rvm_bin_path:-"$rvm_path/bin"}/$file"
|
495
493
|
|
496
494
|
done
|
497
495
|
|
data/lib/VERSION.yml
CHANGED
data/rvm.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{rvm}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.8"
|
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-09-
|
12
|
+
s.date = %q{2010-09-14}
|
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}
|
data/scripts/alias
CHANGED
@@ -23,7 +23,7 @@ usage() {
|
|
23
23
|
|
24
24
|
alias_conflicts_with_ruby() {
|
25
25
|
# If default exists, we should return true.
|
26
|
-
[[ "$1" == "default" && ! -L "$
|
26
|
+
[[ "$1" == "default" && ! -L "$rvm_path/rubies/default" ]] && return 1
|
27
27
|
# Open for suggestions to a better way of doing this...
|
28
28
|
alias_check_result="$(
|
29
29
|
\. \"$rvm_path/scripts/initialize\"
|
@@ -52,7 +52,7 @@ alias_show() {
|
|
52
52
|
return
|
53
53
|
fi
|
54
54
|
|
55
|
-
expanded_alias_name="$("$rvm_path/scripts"/db "$
|
55
|
+
expanded_alias_name="$("$rvm_path/scripts"/db "$rvm_path/config/alias" "$alias_name")"
|
56
56
|
|
57
57
|
if [[ -z "$expanded_alias_name" ]]; then
|
58
58
|
"$rvm_path/scripts"/log "error" "\nUnknown alias name: '$alias_name'\n"
|
@@ -70,11 +70,11 @@ alias_show() {
|
|
70
70
|
alias_delete() {
|
71
71
|
echo "Deleting alias: $alias_name"
|
72
72
|
|
73
|
-
for link in "$
|
73
|
+
for link in "$rvm_path/rubies/$alias_name" ; do
|
74
74
|
if [[ -L "$link" ]] ; then rm -f $link ; fi
|
75
75
|
done
|
76
76
|
|
77
|
-
"$rvm_path/scripts"/db "$
|
77
|
+
"$rvm_path/scripts"/db "$rvm_path/config/alias" "$alias_name" "delete"
|
78
78
|
}
|
79
79
|
|
80
80
|
alias_create() {
|
@@ -107,15 +107,15 @@ alias_create() {
|
|
107
107
|
fi
|
108
108
|
final_environment_identifier="$(__rvm_environment_identifier)"
|
109
109
|
"$rvm_path/scripts"/log "info" "Creating alias $alias_name for $final_environment_identifier."
|
110
|
-
ln -nfs "$
|
110
|
+
ln -nfs "$rvm_path/rubies/$rvm_ruby_string" "$rvm_path/rubies/$alias_name"
|
111
111
|
"$rvm_path/scripts"/log "info" "Recording alias $alias_name for $final_environment_identifier."
|
112
|
-
"$rvm_path/scripts"/db "$
|
112
|
+
"$rvm_path/scripts"/db "$rvm_path/config/alias" "$alias_name" "$final_environment_identifier"
|
113
113
|
else
|
114
|
-
if [[ -d "$
|
115
|
-
"$rvm_path/scripts"/log "error" "\n$
|
114
|
+
if [[ -d "$rvm_path/rubies/$alias_name" ]] ; then
|
115
|
+
"$rvm_path/scripts"/log "error" "\n$rvm_path/rubies/$alias_name is taken and is *not* able to be an alias name.\n"
|
116
116
|
result=1
|
117
117
|
else
|
118
|
-
"$rvm_path/scripts"/log "error" "\n$
|
118
|
+
"$rvm_path/scripts"/log "error" "\n$rvm_path/rubies/$alias_name is already aliased.\n"
|
119
119
|
result=1
|
120
120
|
fi
|
121
121
|
fi
|
@@ -123,11 +123,19 @@ alias_create() {
|
|
123
123
|
}
|
124
124
|
|
125
125
|
alias_list() {
|
126
|
-
|
126
|
+
|
127
|
+
local item
|
128
|
+
|
129
|
+
for item in "$rvm_path/rubies/"* ; do
|
130
|
+
|
127
131
|
if [[ -L "$item" ]] ; then
|
128
|
-
|
132
|
+
|
133
|
+
echo "$(basename "$item") => $("$rvm_path/scripts"/db "$rvm_path/config/alias" "$(basename "$item")")"
|
134
|
+
|
129
135
|
fi
|
130
|
-
|
136
|
+
|
137
|
+
done
|
138
|
+
|
131
139
|
}
|
132
140
|
|
133
141
|
args=($*)
|
@@ -137,7 +145,7 @@ rvm_environment_identifier="${args[2]:-""}"
|
|
137
145
|
args="$(echo ${args[@]:3}) " # Strip trailing / leading / extra spacing.
|
138
146
|
result=0
|
139
147
|
|
140
|
-
if [[ ! -f "$
|
148
|
+
if [[ ! -f "$rvm_path/config/alias" ]] ; then touch "$rvm_path/config/alias" ; fi
|
141
149
|
|
142
150
|
if printf "$alias_name" | grep -q "${rvm_gemset_separator:-"@"}" ; then
|
143
151
|
gemset_name="${alias_name/*${rvm_gemset_separator:-"@"}/}"
|
@@ -147,7 +155,7 @@ else
|
|
147
155
|
fi
|
148
156
|
|
149
157
|
if [[ ! -z "$alias_name" ]] ; then
|
150
|
-
rvm_alias="$("$rvm_path/scripts/db" "$
|
158
|
+
rvm_alias="$("$rvm_path/scripts/db" "$rvm_path/config/alias" "$alias_name")"
|
151
159
|
fi
|
152
160
|
|
153
161
|
if [[ "$action" = "delete" ]] ; then
|
data/scripts/base
CHANGED
data/scripts/cd
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
3
|
# Source a .rvmrc file in a directory after changing to it, if it exists.
|
4
|
-
# To disable this fature, set rvm_project_rvmrc=0 in $HOME/.rvmrc
|
5
|
-
|
6
|
-
if [[ $rvm_project_rvmrc -ne 0 ]] ; then
|
4
|
+
# To disable this fature, set export rvm_project_rvmrc=0 in $HOME/.rvmrc
|
5
|
+
if [[ ${rvm_project_rvmrc:-1} -ne 0 ]] ; then
|
7
6
|
if [[ -n "${ZSH_VERSION:-""}" ]] ; then
|
8
7
|
autoload is-at-least
|
9
8
|
if is-at-least 4.3.4 >/dev/null 2>&1; then
|
@@ -12,7 +11,7 @@ if [[ $rvm_project_rvmrc -ne 0 ]] ; then
|
|
12
11
|
else
|
13
12
|
cd() {
|
14
13
|
builtin cd "$@"
|
15
|
-
result=$?
|
14
|
+
local result=$?
|
16
15
|
__rvm_project_rvmrc
|
17
16
|
return $result
|
18
17
|
}
|
@@ -20,7 +19,7 @@ if [[ $rvm_project_rvmrc -ne 0 ]] ; then
|
|
20
19
|
else
|
21
20
|
cd() {
|
22
21
|
builtin cd "$@"
|
23
|
-
|
22
|
+
local result=$?
|
24
23
|
__rvm_project_rvmrc
|
25
24
|
return $result
|
26
25
|
}
|
data/scripts/cli
CHANGED
@@ -4,11 +4,14 @@ __rvm_usage() { \less "${rvm_path:-$HOME/.rvm}/README" ; }
|
|
4
4
|
|
5
5
|
__rvm_run_script() {
|
6
6
|
local rvm_script_name="${1:-"$rvm_action"}"
|
7
|
+
|
7
8
|
eval "$rvm_path/scripts/$rvm_script_name $rvm_ruby_args"
|
9
|
+
|
8
10
|
return $?
|
9
11
|
}
|
10
12
|
|
11
13
|
__rvm_parse_args() {
|
14
|
+
|
12
15
|
# TODO:
|
13
16
|
# Make this more robust '__rvm_history' so that it stores *unique* rvm commands.
|
14
17
|
# Otherwise this file gets big rather fast.
|
@@ -17,13 +20,15 @@ __rvm_parse_args() {
|
|
17
20
|
if echo "$@" | \grep -q 'trace' ; then echo "$@" ; __rvm_version ; fi
|
18
21
|
|
19
22
|
rvm_action="${rvm_action:-""}"
|
20
|
-
export rvm_ruby_string="${rvm_ruby_string:-""}"
|
21
23
|
|
22
|
-
|
23
|
-
|
24
|
+
export rvm_ruby_string
|
25
|
+
|
26
|
+
rvm_parse_break=0
|
24
27
|
|
25
28
|
while [[ -n "$next_token" ]] ; do
|
29
|
+
|
26
30
|
rvm_token="$next_token"
|
31
|
+
|
27
32
|
if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
|
28
33
|
|
29
34
|
case "$rvm_token" in
|
@@ -126,8 +131,7 @@ __rvm_parse_args() {
|
|
126
131
|
fi
|
127
132
|
|
128
133
|
else
|
129
|
-
|
130
|
-
if [[ "$rvm_ruby_string" != "$rvm_gemset_name" ]] ; then __rvm_ruby_string ; fi
|
134
|
+
if [[ "${rvm_ruby_string:-""}" != "${rvm_gemset_name:-""}" ]] ; then __rvm_ruby_string ; fi
|
131
135
|
rvm_ruby_args="$next_token $@"
|
132
136
|
fi
|
133
137
|
|
@@ -395,7 +399,7 @@ __rvm_parse_args() {
|
|
395
399
|
--trace|--debug)
|
396
400
|
local option=""
|
397
401
|
|
398
|
-
rvm_debug_flag=1
|
402
|
+
export rvm_debug_flag=1
|
399
403
|
|
400
404
|
for option in verbose noclobber nounset ; do
|
401
405
|
set -o $option
|
@@ -409,7 +413,7 @@ __rvm_parse_args() {
|
|
409
413
|
|
410
414
|
if [[ "$rvm_token" = "--trace" ]] ; then
|
411
415
|
|
412
|
-
rvm_trace_flag=1
|
416
|
+
export rvm_trace_flag=1
|
413
417
|
|
414
418
|
set -o xtrace
|
415
419
|
|
@@ -547,7 +551,7 @@ __rvm_parse_args() {
|
|
547
551
|
rvm_ruby_strings="$rvm_token"
|
548
552
|
rvm_action="${rvm_action:-use}"
|
549
553
|
|
550
|
-
elif [[ -L "$
|
554
|
+
elif [[ -L "$rvm_path/rubies/$rvm_token" ]] ; then # Alias
|
551
555
|
rvm_ruby_string=$rvm_token
|
552
556
|
rvm_ruby_strings="$rvm_token"
|
553
557
|
rvm_action="${rvm_action:-use}"
|
@@ -575,6 +579,8 @@ __rvm_parse_args() {
|
|
575
579
|
if [[ ${rvm_parse_break:-0} -eq 1 || -n "${rvm_error_message:-""}" ]] ; then break ; fi
|
576
580
|
done
|
577
581
|
|
582
|
+
export rvm_head_flag $(env | awk -F= -v ORS=' ' '/^rvm_/{print $1}')
|
583
|
+
|
578
584
|
# Empty args list.
|
579
585
|
while [[ $# -gt 0 ]] ; do shift ; done
|
580
586
|
|
@@ -586,7 +592,7 @@ __rvm_parse_args() {
|
|
586
592
|
|
587
593
|
rvm() {
|
588
594
|
|
589
|
-
local
|
595
|
+
local result
|
590
596
|
|
591
597
|
__rvm_setup
|
592
598
|
|
@@ -596,7 +602,7 @@ rvm() {
|
|
596
602
|
|
597
603
|
if [[ -z "${ZSH_VERSION:-""}" ]] ; then
|
598
604
|
|
599
|
-
trap '\rm -rf "$rvm_tmp_path/$$" >/dev/null 2>&1' 0 1 2 3 15
|
605
|
+
trap '\rm -rf "${rvm_tmp_path:-"$rvm_path/tmp"}/$$" >/dev/null 2>&1' 0 1 2 3 15
|
600
606
|
|
601
607
|
fi
|
602
608
|
|
@@ -624,10 +630,10 @@ rvm() {
|
|
624
630
|
|
625
631
|
rvm_action="${rvm_action:-usage}"
|
626
632
|
|
627
|
-
export BUNDLE_PATH GEM_HOME GEM_PATH rvm_ruby_string rvm_action rvm_bin_flag rvm_debug_flag rvm_delete_flag rvm_docs_type rvm_file_name rvm_gemset_name rvm_head_flag rvm_install_on_use_flag rvm_interactive_flag rvm_llvm_flag rvm_make_flags rvm_proxy rvm_remove_flag rvm_ruby_args rvm_configure_flags rvm_ruby_file rvm_ruby_gem_home rvm_ruby_interpreter rvm_ruby_name rvm_ruby_version rvm_system_flag rvm_trace_flag rvm_use_flag rvm_user_flag rvm_verbose_flag rvm_patch_names rvm_patch_original_pwd rvm_clang_flag rvm_install_arguments rvm_path rvm_rubies_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_ruby_aliases rvm_quiet_flag rvm_silent_flag rvm_pretty_print_flag
|
628
|
-
|
629
633
|
result=0
|
630
634
|
|
635
|
+
export BUNDLE_PATH GEM_HOME GEM_PATH $(env | awk -F= -v ORS=' ' '/^rvm_/{print $1}')
|
636
|
+
|
631
637
|
case "$rvm_action" in
|
632
638
|
use) __rvm_use ;;
|
633
639
|
srcdir) __rvm_source_dir ;;
|
@@ -668,10 +674,12 @@ rvm() {
|
|
668
674
|
old_rvm_ruby_string=$rvm_ruby_string
|
669
675
|
unset rvm_ruby_string
|
670
676
|
export rvm_ruby_strings
|
671
|
-
|
672
|
-
result=$?
|
677
|
+
|
678
|
+
"$rvm_path/scripts/set" "$rvm_action" $rvm_ruby_args ; result=$?
|
679
|
+
|
673
680
|
# Restore the state pre-sets.
|
674
681
|
[[ -n "$old_rvm_ruby_string" ]] && rvm_ruby_string=$old_rvm_ruby_string
|
682
|
+
|
675
683
|
unset old_rvm_ruby_string
|
676
684
|
;;
|
677
685
|
|