rvm 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/binscripts/rvm +13 -15
- data/binscripts/rvm-prompt +18 -14
- data/binscripts/rvm-shell +2 -1
- data/contrib/gemset_snapshot +16 -5
- data/contrib/install-system-wide +73 -9
- data/install +2 -1
- data/lib/VERSION.yml +1 -1
- data/lib/rvm/environment/tools.rb +1 -1
- data/rvm.gemspec +2 -2
- data/scripts/cli +32 -17
- data/scripts/completion +6 -5
- data/scripts/disk-usage +3 -2
- data/scripts/environment-convertor +13 -7
- data/scripts/gemsets +20 -5
- data/scripts/help +4 -4
- data/scripts/info +4 -1
- data/scripts/install +2 -1
- data/scripts/list +153 -51
- data/scripts/log +2 -2
- data/scripts/manage +679 -224
- data/scripts/migrate +48 -8
- data/scripts/override_gem +8 -5
- data/scripts/package +11 -8
- data/scripts/patches +24 -6
- data/scripts/repair +53 -13
- data/scripts/rvm +2 -1
- data/scripts/rvm-install +2 -1
- data/scripts/selector +106 -73
- data/scripts/set +10 -6
- data/scripts/snapshot +3 -3
- data/scripts/update +2 -1
- data/scripts/upgrade +27 -6
- data/scripts/utility +222 -71
- data/scripts/wrapper +64 -23
- metadata +4 -4
data/binscripts/rvm
CHANGED
@@ -1,11 +1,14 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
|
-
|
4
|
-
if [[ $rvm_ignore_rvmrc -eq 0 ]]; then
|
3
|
+
if [[ ${rvm_ignore_rvmrc:-0} -eq 0 ]]; then
|
5
4
|
for rvmrc in /etc/rvmrc "$HOME/.rvmrc" ; do
|
6
5
|
if [[ -f "$rvmrc" ]] ; then
|
7
|
-
if
|
8
|
-
printf "\
|
6
|
+
if grep -q '^\s*rvm .*$' "$rvmrc" ; then
|
7
|
+
printf "\n Error:
|
8
|
+
$rvmrc is for rvm settings only.
|
9
|
+
rvm CLI may NOT be called from within $rvmrc.
|
10
|
+
Skipping the loading of $rvmrc
|
11
|
+
"
|
9
12
|
exit 1
|
10
13
|
else
|
11
14
|
source "$rvmrc"
|
@@ -14,11 +17,8 @@ if [[ $rvm_ignore_rvmrc -eq 0 ]]; then
|
|
14
17
|
done
|
15
18
|
fi
|
16
19
|
|
17
|
-
[[ -z "$rvm_prefix" ]] && unset rvm_prefix
|
18
|
-
[[ -z "$rvm_path" ]] && unset rvm_path
|
19
|
-
|
20
20
|
# Setup default sandbox value. See scripts/rvm for origin.
|
21
|
-
if [[
|
21
|
+
if [[ ${rvm_selfcontained:-0} -eq 0 ]]; then
|
22
22
|
if [[ "root" = "$(whoami)" ]] || [[ -n "$rvm_prefix" && "$rvm_prefix" != "$HOME"/* ]]; then
|
23
23
|
rvm_selfcontained=0
|
24
24
|
else
|
@@ -26,8 +26,8 @@ if [[ -z "$rvm_selfcontained" ]]; then
|
|
26
26
|
fi
|
27
27
|
fi
|
28
28
|
|
29
|
-
if [[ -z "$rvm_prefix" ]] ; then
|
30
|
-
if [[
|
29
|
+
if [[ -z "${rvm_prefix:-""}" ]] ; then
|
30
|
+
if [[ ${rvm_selfcontained:-0} -eq 0 ]] ; then
|
31
31
|
rvm_prefix="/usr/local/"
|
32
32
|
else
|
33
33
|
rvm_prefix="$HOME/."
|
@@ -35,19 +35,17 @@ if [[ -z "$rvm_prefix" ]] ; then
|
|
35
35
|
fi
|
36
36
|
|
37
37
|
# Fix rvm_prefix changes.
|
38
|
-
echo "$rvm_prefix" |
|
38
|
+
echo "$rvm_prefix" | grep -vq '\(\/\|\.\)$' && [[ -d "$rvm_prefix/rvm/scripts" ]]
|
39
39
|
rvm_prefix_needs_trailing_slash="$?"
|
40
40
|
if [[ "$rvm_prefix" = "/usr/local" || "$rvm_prefix_needs_trailing_slash" = "0" ]]; then
|
41
41
|
rvm_prefix="$rvm_prefix/"
|
42
42
|
fi
|
43
|
-
unset rvm_prefix_needs_trailing_slash
|
44
43
|
|
45
|
-
if [[ -z "$rvm_path" ]] ; then
|
44
|
+
if [[ -z "${rvm_path:-""}" ]] ; then
|
46
45
|
rvm_path="${rvm_prefix}rvm"
|
47
46
|
fi
|
48
|
-
rvm_scripts_path="${rvm_scripts_path:-"$rvm_path/scripts"}"
|
49
47
|
|
50
|
-
source "$
|
48
|
+
source "$rvm_path/scripts/rvm"
|
51
49
|
|
52
50
|
unset rvm_interactive_flag
|
53
51
|
|
data/binscripts/rvm-prompt
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
3
|
add(){
|
4
|
-
token
|
4
|
+
token=${1:-""}
|
5
5
|
eval "${token}_flag=1" ; shift
|
6
|
-
if [[
|
6
|
+
if [[ -n "$format" ]] ; then
|
7
7
|
format="${format}-\$${token}"
|
8
8
|
else
|
9
9
|
format="\$${token}"
|
@@ -11,8 +11,10 @@ add(){
|
|
11
11
|
}
|
12
12
|
|
13
13
|
rvm_gemset_separator="${rvm_gemset_separator:-"@"}"
|
14
|
+
|
14
15
|
ruby=$(command -v ruby)
|
15
|
-
|
16
|
+
|
17
|
+
if [[ -n "$ruby" && -n "$(echo "$ruby" | awk '/rvm/{print}')" ]] ; then
|
16
18
|
unset format
|
17
19
|
while [[ $# -gt 0 ]] ; do
|
18
20
|
token="$1" ; shift
|
@@ -44,27 +46,29 @@ if [[ ! -z "$ruby" ]] && [[ ! -z "$(echo "$ruby" | awk '/rvm/{print}')" ]] ; the
|
|
44
46
|
exit 0
|
45
47
|
fi
|
46
48
|
|
47
|
-
if [[
|
49
|
+
if [[ ${interpreter_flag:-0} -gt 0 || -n "$unicode_flag" ]] ; then
|
48
50
|
interpreter="${ruby_string/-*/}"
|
49
51
|
fi
|
50
52
|
|
51
|
-
if [[
|
53
|
+
if [[ ${version_flag:-0} -gt 0 || -n "$unicode_flag" ]] ; then
|
52
54
|
version="${ruby_string%-*}" ; version="${version#*-}"
|
53
55
|
fi
|
54
56
|
|
55
|
-
if [[
|
57
|
+
if [[ ${patchlevel_flag:-0} -gt 0 ]] ; then
|
56
58
|
patchlevel="${ruby_string##*-}"
|
57
59
|
fi
|
58
60
|
|
59
|
-
if [[
|
61
|
+
if [[ ${architecture_flag:-0} -gt 0 ]] ; then
|
60
62
|
architecture="$(echo "$(ruby -v)" | sed 's/^.*\[//' | sed 's/\].*$//')"
|
61
63
|
fi
|
62
64
|
|
63
|
-
if [[
|
64
|
-
|
65
|
+
if [[ ${gemset_flag:-0} -gt 0 ]] ; then
|
66
|
+
case "${GEM_HOME:-""}" in
|
67
|
+
*${rvm_gemset_separator}*) gemset="${rvm_gemset_separator}${GEM_HOME/*${rvm_gemset_separator}/}" ;;
|
68
|
+
esac
|
65
69
|
fi
|
66
70
|
|
67
|
-
if [[
|
71
|
+
if [[ ${unicode_flag:-0} -gt 0 ]] ; then
|
68
72
|
case "$interpreter" in
|
69
73
|
jruby) unicode="☯" ;;
|
70
74
|
rbx) unicode="☃" ;;
|
@@ -75,7 +79,7 @@ if [[ ! -z "$ruby" ]] && [[ ! -z "$(echo "$ruby" | awk '/rvm/{print}')" ]] ; the
|
|
75
79
|
mput) unicode="⎈" ;;
|
76
80
|
system) unicode="➆" ;;
|
77
81
|
ruby)
|
78
|
-
case
|
82
|
+
case ${version:-""} in
|
79
83
|
1.8.6) unicode="❻" ;;
|
80
84
|
1.8.7) unicode="❼" ;;
|
81
85
|
1.9.1) unicode="❶" ;;
|
@@ -90,15 +94,15 @@ if [[ ! -z "$ruby" ]] && [[ ! -z "$(echo "$ruby" | awk '/rvm/{print}')" ]] ; the
|
|
90
94
|
fi
|
91
95
|
fi
|
92
96
|
|
93
|
-
|
94
|
-
|
97
|
+
eval "prompt=\"$format\""
|
98
|
+
|
95
99
|
echo "$prompt" | sed -e 's#^[[:space:]]*-*##g' -e 's#--*#-#g' -e 's#-*[[:space:]]*$##' -e 's#-'${rvm_gemset_separator}'#'${rvm_gemset_separator}'#'
|
96
100
|
|
97
101
|
else
|
98
102
|
while [[ $# -gt 0 ]] ; do
|
99
103
|
token="$1" ; shift
|
100
104
|
case "$token" in
|
101
|
-
s|system)
|
105
|
+
s|system) echo "system" ;;
|
102
106
|
esac
|
103
107
|
done
|
104
108
|
fi
|
data/binscripts/rvm-shell
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
3
|
__rvm_shell_lookup_script() {
|
4
|
-
local relative_scripts_dir
|
4
|
+
local relative_scripts_dir
|
5
|
+
relative_scripts_dir="$(dirname -- "$(dirname -- "$0")")/scripts"
|
5
6
|
for directory in "$rvm_scripts_path" "$HOME/.rvm/scripts" "/usr/local/rvm/scripts" "$relative_scripts_dir"; do
|
6
7
|
if [[ -d "$directory" && -s "$directory/rvm" ]]; then
|
7
8
|
echo "$directory/rvm"
|
data/contrib/gemset_snapshot
CHANGED
@@ -1,14 +1,25 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
|
-
|
3
|
+
printf "\nBeginning snapshot of the current environment gem list into snapshot.gems\n"
|
4
|
+
|
4
5
|
file_name="snapshot.gems"
|
5
|
-
|
6
|
-
|
6
|
+
|
7
|
+
gems=($(gem list | sed 's#[\(|\)]##g' | sed 's#, #,#g' | \tr ' ' ';'))
|
8
|
+
|
9
|
+
for gem in "${gems[@]}" ; do
|
10
|
+
|
7
11
|
name="$(echo $gem | awk -F';' '{print $1}')"
|
8
|
-
|
9
|
-
|
12
|
+
|
13
|
+
versions=($(echo $gem | awk -F';' '{print $2}' | sed 's#,# #g'))
|
14
|
+
|
15
|
+
for version in "${versions[@]}" ; do
|
16
|
+
|
10
17
|
echo "$name -v$version" >> "$file_name"
|
18
|
+
|
11
19
|
done ; unset version versions
|
20
|
+
|
12
21
|
done ; unset file_name
|
13
22
|
|
23
|
+
printf "\nCompleted snapshot of the current environment gem list into snapshot.gems\n"
|
24
|
+
|
14
25
|
exit $?
|
data/contrib/install-system-wide
CHANGED
@@ -1,25 +1,84 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
|
+
usage() {
|
4
|
+
printf "
|
5
|
+
|
6
|
+
Usage:
|
7
|
+
|
8
|
+
rvm-install-system-wide [options]
|
9
|
+
|
10
|
+
Options:
|
11
|
+
|
12
|
+
--trace - Run turn on bash xtrace while the script runs.
|
13
|
+
--debug - Turn on bash verbose while the script runs.
|
14
|
+
--version X - Install RVM version X
|
15
|
+
--revision X - Install RVM revision X (sha1)
|
16
|
+
--help - Display this usage text.
|
17
|
+
|
18
|
+
"
|
19
|
+
return 0
|
20
|
+
}
|
21
|
+
|
3
22
|
__rvm_system_wide_permissions() {
|
4
23
|
[[ -z "$1" ]] && return 1
|
24
|
+
|
5
25
|
chown -R root:"$rvm_group_name" "$1"
|
26
|
+
|
6
27
|
chmod -R g+w "$1"
|
7
|
-
|
28
|
+
|
29
|
+
if [[ -d "$1" ]] ; then
|
30
|
+
find "$1" -type d -print0 | xargs -n1 -0 chmod g+s
|
31
|
+
fi
|
32
|
+
|
33
|
+
return 0
|
8
34
|
}
|
9
35
|
|
10
36
|
# Require root to install it.
|
11
37
|
if [[ "$(whoami)" != "root" ]]; then
|
12
38
|
echo "Please rerun this installer as root." >&2
|
13
39
|
exit 1
|
40
|
+
|
14
41
|
# Check for the presence of git.
|
15
|
-
elif
|
42
|
+
elif [[ -z "$(command -v git)" ]] ; then
|
16
43
|
echo "Please ensure git is installed and available in PATH to continue." >&2
|
17
44
|
exit 1
|
45
|
+
|
18
46
|
elif [[ "$(uname)" != "Linux" ]]; then
|
19
47
|
echo "The rvm system wide installer is currently Linux only." >&2
|
20
48
|
exit 1
|
21
49
|
fi
|
22
50
|
|
51
|
+
while [[ $# -gt 0 ]] ; do
|
52
|
+
case $1 in
|
53
|
+
--trace)
|
54
|
+
rvm_trace_flag=1
|
55
|
+
set -o xtrace
|
56
|
+
;;
|
57
|
+
--debug)
|
58
|
+
rvm_trace_flag=1
|
59
|
+
set -o verbose
|
60
|
+
;;
|
61
|
+
--version|--revision)
|
62
|
+
if [[ -n "${1:-""}" ]] ; then
|
63
|
+
revision="$1"
|
64
|
+
shift
|
65
|
+
else
|
66
|
+
usage
|
67
|
+
exit 1
|
68
|
+
fi
|
69
|
+
;;
|
70
|
+
--help)
|
71
|
+
usage
|
72
|
+
exit 0
|
73
|
+
;;
|
74
|
+
*)
|
75
|
+
usage
|
76
|
+
exit 1
|
77
|
+
;;
|
78
|
+
esac
|
79
|
+
shift
|
80
|
+
done
|
81
|
+
|
23
82
|
# Load the rvm config.
|
24
83
|
rvm_ignore_rvmrc=${rvm_ignore_rvmrc:-0}
|
25
84
|
if [[ $rvm_ignore_rvmrc -eq 0 ]]; then
|
@@ -41,18 +100,23 @@ echo "Adding $(whoami) the '$rvm_group_name'"
|
|
41
100
|
usermod -a -G "$rvm_group_name" "$(whoami)"
|
42
101
|
|
43
102
|
echo "Creating the destination dir and making sure the permissions are correct"
|
44
|
-
|
103
|
+
mkdir -p "$rvm_path"
|
45
104
|
__rvm_system_wide_permissions "$rvm_path"
|
46
105
|
|
47
|
-
|
106
|
+
mkdir -p "$rvm_path/src/"
|
48
107
|
builtin cd "$rvm_path/src"
|
49
108
|
|
50
|
-
|
109
|
+
rm -rf ./rvm/
|
51
110
|
|
52
111
|
git clone --depth 1 git://github.com/wayneeseguin/rvm.git || git clone http://github.com/wayneeseguin/rvm.git
|
53
112
|
|
54
113
|
builtin cd rvm
|
55
114
|
|
115
|
+
if [[ "${revision:-""}" ]]; then
|
116
|
+
echo "Checking out revision $revision"
|
117
|
+
git checkout $revision
|
118
|
+
fi
|
119
|
+
|
56
120
|
echo "Running the install script."
|
57
121
|
bash ./scripts/install "$@"
|
58
122
|
|
@@ -65,8 +129,8 @@ for dir in bin share/man; do
|
|
65
129
|
done; unset dir
|
66
130
|
|
67
131
|
echo "Generating system wide rvmrc"
|
68
|
-
|
69
|
-
|
132
|
+
rm -f /etc/rvmrc
|
133
|
+
touch /etc/rvmrc
|
70
134
|
cat > /etc/rvmrc <<END_OF_RVMRC
|
71
135
|
# Setup default configuration for rvm.
|
72
136
|
# If an rvm install exists in the home directory, don't load this.'
|
@@ -78,8 +142,8 @@ fi
|
|
78
142
|
END_OF_RVMRC
|
79
143
|
|
80
144
|
echo "Generating $rvm_parent_dir/lib/rvm to load rvm"
|
81
|
-
|
82
|
-
|
145
|
+
rm -f "$rvm_parent_dir/lib/rvm"
|
146
|
+
touch "$rvm_parent_dir/lib/rvm"
|
83
147
|
cat > "$rvm_parent_dir/lib/rvm" <<END_OF_RVM_SH
|
84
148
|
# Automatically source rvm
|
85
149
|
if [[ -s "\$HOME/.rvm/scripts/rvm" ]]; then
|
data/install
CHANGED
@@ -383,7 +383,8 @@ for file in rvm rvmsudo rvm-shell rvm-auto-ruby ; do
|
|
383
383
|
[[ -s "$rvm_bin_path/$file" ]] && chmod +x "$rvm_bin_path/$file"
|
384
384
|
done; unset file
|
385
385
|
printf "\n Copying manpages into place."
|
386
|
-
|
386
|
+
|
387
|
+
for man_file in $(builtin cd "$install_source_path/man" ; find * -type f -maxdepth 0 -print); do
|
387
388
|
rm -rf "$rvm_man_path/$man_file"
|
388
389
|
cp -R "$install_source_path/man/$man_file" "$rvm_man_path/"
|
389
390
|
done
|
data/lib/VERSION.yml
CHANGED
@@ -22,7 +22,7 @@ module RVM
|
|
22
22
|
names = {}
|
23
23
|
value = rvm(:tools, :strings, *rubies)
|
24
24
|
if value.successful?
|
25
|
-
parts = value.stdout.split
|
25
|
+
parts = value.stdout.split
|
26
26
|
rubies.each_with_index do |key, index|
|
27
27
|
names[key] = normalize(parts[index])
|
28
28
|
end
|
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.6"
|
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-10}
|
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/cli
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
|
-
__rvm_usage() {
|
3
|
+
__rvm_usage() { \less "${rvm_path:-$HOME/.rvm}/README" ; }
|
4
4
|
|
5
5
|
__rvm_run_script() {
|
6
6
|
local rvm_script_name="${1:-"$rvm_action"}"
|
@@ -230,13 +230,18 @@ __rvm_parse_args() {
|
|
230
230
|
unset rvm_ruby_interpreter
|
231
231
|
|
232
232
|
else
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
233
|
+
case "$next_token" in
|
234
|
+
|
235
|
+
ruby|rbx|jruby|macruby|ree|rubinius|maglev|mput|shyouhei|ironruby)
|
236
|
+
rvm_ruby_strings=$next_token
|
237
|
+
rvm_ruby_interpreter=$next_token
|
238
|
+
if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
|
239
|
+
;;
|
240
|
+
|
241
|
+
*)
|
242
|
+
unset rvm_ruby_interpreter rvm_ruby_strings
|
243
|
+
;;
|
244
|
+
esac
|
240
245
|
fi
|
241
246
|
fi
|
242
247
|
fi
|
@@ -248,7 +253,7 @@ __rvm_parse_args() {
|
|
248
253
|
|
249
254
|
specs|tests)
|
250
255
|
rvm_action="rake"
|
251
|
-
rvm_ruby_args="$
|
256
|
+
rvm_ruby_args="${rvm_token/%ss/s}"
|
252
257
|
;;
|
253
258
|
|
254
259
|
-v|--version)
|
@@ -409,19 +414,24 @@ __rvm_parse_args() {
|
|
409
414
|
|
410
415
|
--trace|--debug)
|
411
416
|
local option=""
|
417
|
+
|
412
418
|
rvm_debug_flag=1
|
413
419
|
|
414
420
|
for option in verbose errexit noclobber nounset ; do
|
415
421
|
set -o $option
|
416
422
|
done
|
423
|
+
|
417
424
|
if [[ -z "${ZSH_VERSION:-""}" ]] ; then
|
418
425
|
set -o errtrace
|
419
426
|
set -o pipefail
|
420
427
|
fi
|
421
428
|
|
422
429
|
if [[ "$rvm_token" = "--trace" ]] ; then
|
430
|
+
|
423
431
|
rvm_trace_flag=1
|
432
|
+
|
424
433
|
set -o xtrace
|
434
|
+
|
425
435
|
if [[ -z "${ZSH_VERSION:-""}" ]] ; then
|
426
436
|
export PS4='+${BASH_SOURCE} : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() : }'
|
427
437
|
fi
|
@@ -476,7 +486,7 @@ __rvm_parse_args() {
|
|
476
486
|
|
477
487
|
-C|--configure)
|
478
488
|
if [[ ! -z "$next_token" ]] ; then
|
479
|
-
|
489
|
+
rvm_configure_flags="${next_token//,--/ --}"
|
480
490
|
if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
|
481
491
|
|
482
492
|
else
|
@@ -485,10 +495,10 @@ __rvm_parse_args() {
|
|
485
495
|
fi
|
486
496
|
;;
|
487
497
|
|
488
|
-
--with-*)
|
489
|
-
--without-*)
|
490
|
-
--enable-*)
|
491
|
-
--disable-*)
|
498
|
+
--with-*) rvm_configure_flags="${rvm_configure_flags:-""} $rvm_token" ;;
|
499
|
+
--without-*) rvm_configure_flags="${rvm_configure_flags:-""} $rvm_token" ;;
|
500
|
+
--enable-*) rvm_configure_flags="${rvm_configure_flags:-""} $rvm_token" ;;
|
501
|
+
--disable-*) rvm_configure_flags="${rvm_configure_flags:-""} $rvm_token" ;;
|
492
502
|
|
493
503
|
-I|--include)
|
494
504
|
if [[ -z "$next_token" ]] ; then
|
@@ -591,6 +601,7 @@ __rvm_parse_args() {
|
|
591
601
|
}
|
592
602
|
|
593
603
|
rvm() {
|
604
|
+
|
594
605
|
local next_token
|
595
606
|
|
596
607
|
__rvm_setup
|
@@ -604,23 +615,27 @@ rvm() {
|
|
604
615
|
fi
|
605
616
|
|
606
617
|
# Check that this is the current version.
|
607
|
-
disk_version
|
618
|
+
disk_version="$(awk '/:/{printf $NF"."}' "$rvm_path/lib/VERSION.yml")"
|
619
|
+
disk_version="${disk_version/%.}"
|
608
620
|
|
609
621
|
if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
|
610
622
|
|
611
|
-
if [[ "${rvm_version}" != "${disk_version}"
|
623
|
+
if [[ "${rvm_version}" != "${disk_version}" && "reload" != "$next_token" ]]; then
|
612
624
|
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"
|
613
625
|
return 1
|
614
626
|
fi
|
615
627
|
|
616
628
|
__rvm_cleanse_variables
|
629
|
+
|
617
630
|
__rvm_load_rvmrc
|
631
|
+
|
618
632
|
__rvm_initialize
|
633
|
+
|
619
634
|
__rvm_parse_args "$@"
|
620
635
|
|
621
636
|
rvm_action="${rvm_action:-usage}"
|
622
637
|
|
623
|
-
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
|
638
|
+
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_scripts_path rvm_archives_path rvm_src_path rvm_patches_path rvm_patches_path rvm_patchsets_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
|
624
639
|
|
625
640
|
result=0
|
626
641
|
|