rvm 1.0.10 → 1.0.11
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/LICENCE +1 -1
- data/install +45 -29
- data/lib/VERSION.yml +1 -1
- data/rvm.gemspec +2 -2
- data/scripts/alias +2 -2
- data/scripts/base +4 -0
- data/scripts/cd +25 -0
- data/scripts/cli +8 -2
- data/scripts/gemsets +6 -3
- data/scripts/help +4 -3
- data/scripts/install +45 -29
- data/scripts/list +1 -1
- data/scripts/repair +50 -10
- data/scripts/rvm-install +45 -29
- data/scripts/selector +6 -12
- data/scripts/update +45 -29
- data/scripts/utility +7 -12
- data/scripts/wrapper +7 -4
- metadata +4 -4
data/LICENCE
CHANGED
data/install
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
|
-
|
3
|
+
set -o errtrace
|
4
|
+
export PS4='+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }'
|
4
5
|
|
5
6
|
if [[ -z "$rvm_selfcontained" ]]; then
|
6
7
|
if [[ "root" = "$(whoami)" ]] || [[ -n "$rvm_prefix" && "$rvm_prefix" != "$HOME"/* ]]; then
|
@@ -13,6 +14,7 @@ fi
|
|
13
14
|
unset rvm_auto_flag
|
14
15
|
|
15
16
|
install_source_path="$(dirname "$0" | sed 's#\/scripts$##')"
|
17
|
+
|
16
18
|
if [[ -d "$install_source_path/scripts" ]] && [[ -s "$install_source_path/scripts/utility" ]] ; then
|
17
19
|
builtin cd "$install_source_path"
|
18
20
|
fi
|
@@ -34,21 +36,12 @@ usage() {
|
|
34
36
|
}
|
35
37
|
|
36
38
|
check_rubyopt_conditions() {
|
37
|
-
if [[ -n "$RUBYOPT" ]]; then
|
39
|
+
if [[ -n "${RUBYOPT:-""}" ]]; then
|
38
40
|
printf "\n\nWARNING: You have RUBYOPT set in your current environment. This may interfere with normal rvm"
|
39
41
|
printf "\n operation. If errors show up, please try unsetting RUBYOPT first.\n"
|
40
42
|
fi
|
41
43
|
}
|
42
44
|
|
43
|
-
# Regenerates a users wrappers as part of the update.
|
44
|
-
regenerate_wrappers() {
|
45
|
-
printf "\n"
|
46
|
-
if command -v __rvm_regenerate_wrappers >/dev/null; then
|
47
|
-
__rvm_regenerate_wrappers
|
48
|
-
fi
|
49
|
-
printf "\n"
|
50
|
-
}
|
51
|
-
|
52
45
|
andand_return_instructions() {
|
53
46
|
printf "
|
54
47
|
This means that if you see something like:
|
@@ -158,7 +151,8 @@ Upgrade Notes
|
|
158
151
|
"
|
159
152
|
}
|
160
153
|
|
161
|
-
|
154
|
+
set -o noclobber
|
155
|
+
set -o nounset
|
162
156
|
|
163
157
|
while [[ $# -gt 0 ]] ; do
|
164
158
|
token="$1" ; shift
|
@@ -166,11 +160,19 @@ while [[ $# -gt 0 ]] ; do
|
|
166
160
|
--auto) rvm_auto_flag=1 ;;
|
167
161
|
--prefix) rvm_prefix="$1" ; shift ;;
|
168
162
|
--version) rvm_path="$PWD" ; __rvm_version ; unset rvm_path ; exit ;;
|
163
|
+
--debug)
|
164
|
+
set -o verbose
|
165
|
+
;;
|
166
|
+
--trace)
|
167
|
+
echo "$*"
|
168
|
+
env | grep '^rvm_'
|
169
|
+
set -o xtrace
|
170
|
+
;;
|
169
171
|
--help|*) usage ;;
|
170
172
|
esac
|
171
173
|
done
|
172
174
|
|
173
|
-
if [[ -z "$rvm_prefix" ]] ; then
|
175
|
+
if [[ -z "${rvm_prefix:-""}" ]] ; then
|
174
176
|
__rvm_load_rvmrc
|
175
177
|
if [[ "$rvm_selfcontained" = "0" ]] ; then
|
176
178
|
rvm_prefix="${rvm_prefix:-"/usr/local/"}"
|
@@ -179,7 +181,9 @@ if [[ -z "$rvm_prefix" ]] ; then
|
|
179
181
|
fi
|
180
182
|
fi
|
181
183
|
|
182
|
-
if [[ -z "$rvm_path" ]] ; then
|
184
|
+
if [[ -z "${rvm_path:-""}" ]] ; then
|
185
|
+
rvm_path="${rvm_prefix}rvm"
|
186
|
+
fi
|
183
187
|
|
184
188
|
source scripts/initialize
|
185
189
|
|
@@ -233,7 +237,7 @@ else
|
|
233
237
|
|
234
238
|
fi
|
235
239
|
|
236
|
-
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"}" )
|
240
|
+
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"}" "$rvm_path/bin" )
|
237
241
|
|
238
242
|
for directory in "${directories[@]}" ; do
|
239
243
|
|
@@ -303,11 +307,11 @@ chmod +x "${rvm_bin_path:-"$rvm_path/bin"}"/* # TODO: this is quite suboptimal.
|
|
303
307
|
#
|
304
308
|
# RC Files
|
305
309
|
#
|
306
|
-
if [[
|
310
|
+
if [[ ${rvm_auto_flag:-0} -eq 1 ]] ; then
|
307
311
|
|
308
312
|
printf "Checking rc files... ($rvm_rc_files)"
|
309
313
|
|
310
|
-
if [[
|
314
|
+
if [[ ${rvm_loaded_flag:-0} -ne 1 ]] ; then
|
311
315
|
|
312
316
|
for rcfile in $(printf $rvm_rc_files) ; do
|
313
317
|
|
@@ -492,22 +496,16 @@ fi
|
|
492
496
|
#
|
493
497
|
# End of gemset migration.
|
494
498
|
#
|
499
|
+
declare -a files
|
500
|
+
|
495
501
|
printf "\n Correct permissions for base binaries in $rvm_bin_path..."
|
496
502
|
|
497
503
|
mkdir -p "${rvm_bin_path:-"$rvm_path/bin"}"
|
498
504
|
|
499
|
-
|
500
|
-
|
501
|
-
[[ -s "${rvm_bin_path:-"$rvm_path/bin"}/$file" ]] && chmod +x "${rvm_bin_path:-"$rvm_path/bin"}/$file"
|
502
|
-
|
503
|
-
done
|
504
|
-
|
505
|
-
# Cleanup any .swp files that might have appeared.
|
506
|
-
files=($( find "$rvm_path/" -mindepth 1 -maxdepth 2 -iname '*.swp' -type f ))
|
507
|
-
|
505
|
+
files=(rvm rvmsudo rvm-shell rvm-auto-ruby)
|
508
506
|
for file in "${files[@]}" ; do
|
509
507
|
|
510
|
-
[[ -
|
508
|
+
[[ -s "${rvm_bin_path:-"$rvm_path/bin"}/$file" ]] && chmod +x "${rvm_bin_path:-"$rvm_path/bin"}/$file"
|
511
509
|
|
512
510
|
done
|
513
511
|
|
@@ -523,7 +521,25 @@ for file in "${files[@]//.\/}" ; do
|
|
523
521
|
|
524
522
|
done
|
525
523
|
|
526
|
-
|
524
|
+
files=($( find "$rvm_path/" -mindepth 1 -maxdepth 2 -iname '*.swp' -type f ))
|
525
|
+
|
526
|
+
if [[ ${#files[@]} -gt 0 ]] ; then
|
527
|
+
|
528
|
+
printf "\n Cleanup any .swp files."
|
529
|
+
|
530
|
+
for file in "${files[@]}" ; do
|
531
|
+
|
532
|
+
if [[ -f "$file" ]] ; then
|
533
|
+
rm -f "$file"
|
534
|
+
fi
|
535
|
+
|
536
|
+
done
|
537
|
+
fi
|
538
|
+
|
539
|
+
if [[ $upgrade_flag -eq 0 ]] ; then
|
540
|
+
chmod +x ./script/notes # Sometimes things don't clone properly :/
|
541
|
+
./scripts/notes
|
542
|
+
fi
|
527
543
|
|
528
544
|
name="$(awk -F= '/^[[:space:]]*name/{print $2}' ~/.gitconfig 2>/dev/null)"
|
529
545
|
|
@@ -532,7 +548,7 @@ if [[ ${upgrade_flag:-0} -eq 1 ]] ; then
|
|
532
548
|
upgrade_notes
|
533
549
|
|
534
550
|
check_rubyopt_conditions
|
535
|
-
|
551
|
+
|
536
552
|
regenerate_wrappers
|
537
553
|
|
538
554
|
printf "\nUpgrade of RVM in $rvm_path/ is complete.\n\n"
|
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.11"
|
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-20}
|
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
@@ -26,8 +26,8 @@ alias_conflicts_with_ruby() {
|
|
26
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
|
-
\.
|
30
|
-
\.
|
29
|
+
\. "$rvm_path/scripts/initialize"
|
30
|
+
\. "$rvm_path/scripts/selector"
|
31
31
|
export rvm_ruby_string=\"$1\"
|
32
32
|
__rvm_ruby_string > /dev/null 2>&1
|
33
33
|
echo "$?"
|
data/scripts/base
CHANGED
@@ -30,6 +30,10 @@ unset script_name rvm_base_except
|
|
30
30
|
if [[ ${rvm_trace_flag:-0} -gt 0 ]]; then
|
31
31
|
export rvm_trace_flag=1
|
32
32
|
set -o xtrace
|
33
|
+
|
34
|
+
if [[ -z "${ZSH_VERSION:-""}" ]] ; then
|
35
|
+
export PS4='+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }'
|
36
|
+
fi
|
33
37
|
fi
|
34
38
|
|
35
39
|
if [[ -n "${ZSH_VERSION:-""}" ]] ; then
|
data/scripts/cd
CHANGED
@@ -3,12 +3,16 @@
|
|
3
3
|
# Source a .rvmrc file in a directory after changing to it, if it exists.
|
4
4
|
# To disable this fature, set export rvm_project_rvmrc=0 in $HOME/.rvmrc
|
5
5
|
if [[ ${rvm_project_rvmrc:-1} -ne 0 ]] ; then
|
6
|
+
|
6
7
|
if [[ -n "${ZSH_VERSION:-""}" ]] ; then
|
8
|
+
|
7
9
|
autoload is-at-least
|
10
|
+
|
8
11
|
if is-at-least 4.3.4 >/dev/null 2>&1; then
|
9
12
|
# On zsh, use chpwd_functions
|
10
13
|
chpwd_functions=( "${chpwd_functions[@]}" __rvm_project_rvmrc )
|
11
14
|
else
|
15
|
+
|
12
16
|
cd() {
|
13
17
|
builtin cd "$@"
|
14
18
|
local result=$?
|
@@ -18,8 +22,11 @@ if [[ ${rvm_project_rvmrc:-1} -ne 0 ]] ; then
|
|
18
22
|
|
19
23
|
return $result
|
20
24
|
}
|
25
|
+
|
21
26
|
fi
|
27
|
+
|
22
28
|
else
|
29
|
+
|
23
30
|
cd() {
|
24
31
|
builtin cd "$@"
|
25
32
|
local result=$?
|
@@ -29,5 +36,23 @@ if [[ ${rvm_project_rvmrc:-1} -ne 0 ]] ; then
|
|
29
36
|
|
30
37
|
return $result
|
31
38
|
}
|
39
|
+
|
40
|
+
_rvm_cd_complete ()
|
41
|
+
{
|
42
|
+
local cur matches
|
43
|
+
COMPREPLY=()
|
44
|
+
cur="${COMP_WORDS[COMP_CWORD]}"
|
45
|
+
|
46
|
+
matches=$(for dir in $(echo $CDPATH | tr -s ':' ' ') ; do
|
47
|
+
find $dir/* -type d -maxdepth 0 -exec basename {} \;
|
48
|
+
done | sort | uniq)
|
49
|
+
|
50
|
+
COMPREPLY=( $(compgen -W "${matches}" -- ${cur}) )
|
51
|
+
}
|
52
|
+
|
53
|
+
complete -o bashdefault -o default -o dirnames -o filenames -o nospace -o plusdirs -F _rvm_cd_complete cd
|
54
|
+
|
32
55
|
fi
|
56
|
+
|
33
57
|
fi
|
58
|
+
|
data/scripts/cli
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
|
-
__rvm_usage() {
|
3
|
+
__rvm_usage() { ${PAGER:-less} "${rvm_path:-$HOME/.rvm}/README" ; }
|
4
4
|
|
5
5
|
__rvm_run_script() {
|
6
6
|
local rvm_script_name="${1:-"$rvm_action"}"
|
@@ -337,7 +337,13 @@ __rvm_parse_args() {
|
|
337
337
|
rvm_parse_break=1
|
338
338
|
;;
|
339
339
|
|
340
|
-
--passenger
|
340
|
+
--passenger)
|
341
|
+
"$rvm_path/scripts/log" "info" \
|
342
|
+
"NOTE: If you are using Passenger 3 you no longer need the passenger_ruby,\nuse the wrapper script for your ruby instead (see 'rvm wrapper')"
|
343
|
+
rvm_wrapper_name="${rvm_token/--/}"
|
344
|
+
;;
|
345
|
+
|
346
|
+
--editor)
|
341
347
|
rvm_wrapper_name="${rvm_token/--/}"
|
342
348
|
;;
|
343
349
|
|
data/scripts/gemsets
CHANGED
@@ -308,8 +308,11 @@ gemset_empty() {
|
|
308
308
|
gemset_copy() {
|
309
309
|
local source_ruby destination_ruby source_path destination_path
|
310
310
|
|
311
|
-
source_ruby="${args[
|
312
|
-
|
311
|
+
source_ruby="${args[__array_start]:-""}"
|
312
|
+
args[$__array_start]="" ; args=(${args[@]})
|
313
|
+
|
314
|
+
destination_ruby="${args[__array_start]:-""}"
|
315
|
+
args[$__array_start]="" ; args=(${args[@]})
|
313
316
|
|
314
317
|
if [[ -z "$destination_ruby" || -z "$source_ruby" ]] ; then
|
315
318
|
"$rvm_path/scripts/log" "error" "Source and destination must be specified: 'rvm gemset copy X Y'"
|
@@ -344,7 +347,7 @@ gemset_copy() {
|
|
344
347
|
|
345
348
|
mkdir -p "$destination_path/$dir"
|
346
349
|
|
347
|
-
if [[ -d "$
|
350
|
+
if [[ -d "$source_path/$dir" ]] ; then
|
348
351
|
cp -Rf "$source_path/$dir" "$destination_path/"
|
349
352
|
|
350
353
|
elif [[ -L "$source_path/$dir" ]] ; then
|
data/scripts/help
CHANGED
@@ -15,22 +15,23 @@ args=(${args[@]})
|
|
15
15
|
action="${args[$array_start]}"
|
16
16
|
args[$__array_start]=""
|
17
17
|
args=(${args[@]})
|
18
|
+
pager="${PAGER:-less}"
|
18
19
|
|
19
20
|
if [[ -n "$command" && -s "${rvm_help_path}/${command}" ]] ; then
|
20
21
|
|
21
22
|
if [[ -n "$action" && -s "${rvm_help_path}/${command}/${action}" ]] ; then
|
22
23
|
|
23
|
-
|
24
|
+
$pager "${rvm_help_path}/${command}/${action}"
|
24
25
|
|
25
26
|
else
|
26
27
|
|
27
|
-
|
28
|
+
$pager "${rvm_help_path}/${command}"
|
28
29
|
|
29
30
|
fi
|
30
31
|
|
31
32
|
else
|
32
33
|
|
33
|
-
|
34
|
+
$pager "${rvm_path:-$HOME/.rvm}/README"
|
34
35
|
|
35
36
|
"$rvm_path/scripts/log" "info" \
|
36
37
|
"Commands available with 'rvm help':\n\n $(builtin cd "${rvm_help_path}" ; find . -maxdepth 1 -mindepth 1 -type f -print | \tr "\n" ' ' | sed -e 's#./##g')"
|
data/scripts/install
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
|
-
|
3
|
+
set -o errtrace
|
4
|
+
export PS4='+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }'
|
4
5
|
|
5
6
|
if [[ -z "$rvm_selfcontained" ]]; then
|
6
7
|
if [[ "root" = "$(whoami)" ]] || [[ -n "$rvm_prefix" && "$rvm_prefix" != "$HOME"/* ]]; then
|
@@ -13,6 +14,7 @@ fi
|
|
13
14
|
unset rvm_auto_flag
|
14
15
|
|
15
16
|
install_source_path="$(dirname "$0" | sed 's#\/scripts$##')"
|
17
|
+
|
16
18
|
if [[ -d "$install_source_path/scripts" ]] && [[ -s "$install_source_path/scripts/utility" ]] ; then
|
17
19
|
builtin cd "$install_source_path"
|
18
20
|
fi
|
@@ -34,21 +36,12 @@ usage() {
|
|
34
36
|
}
|
35
37
|
|
36
38
|
check_rubyopt_conditions() {
|
37
|
-
if [[ -n "$RUBYOPT" ]]; then
|
39
|
+
if [[ -n "${RUBYOPT:-""}" ]]; then
|
38
40
|
printf "\n\nWARNING: You have RUBYOPT set in your current environment. This may interfere with normal rvm"
|
39
41
|
printf "\n operation. If errors show up, please try unsetting RUBYOPT first.\n"
|
40
42
|
fi
|
41
43
|
}
|
42
44
|
|
43
|
-
# Regenerates a users wrappers as part of the update.
|
44
|
-
regenerate_wrappers() {
|
45
|
-
printf "\n"
|
46
|
-
if command -v __rvm_regenerate_wrappers >/dev/null; then
|
47
|
-
__rvm_regenerate_wrappers
|
48
|
-
fi
|
49
|
-
printf "\n"
|
50
|
-
}
|
51
|
-
|
52
45
|
andand_return_instructions() {
|
53
46
|
printf "
|
54
47
|
This means that if you see something like:
|
@@ -158,7 +151,8 @@ Upgrade Notes
|
|
158
151
|
"
|
159
152
|
}
|
160
153
|
|
161
|
-
|
154
|
+
set -o noclobber
|
155
|
+
set -o nounset
|
162
156
|
|
163
157
|
while [[ $# -gt 0 ]] ; do
|
164
158
|
token="$1" ; shift
|
@@ -166,11 +160,19 @@ while [[ $# -gt 0 ]] ; do
|
|
166
160
|
--auto) rvm_auto_flag=1 ;;
|
167
161
|
--prefix) rvm_prefix="$1" ; shift ;;
|
168
162
|
--version) rvm_path="$PWD" ; __rvm_version ; unset rvm_path ; exit ;;
|
163
|
+
--debug)
|
164
|
+
set -o verbose
|
165
|
+
;;
|
166
|
+
--trace)
|
167
|
+
echo "$*"
|
168
|
+
env | grep '^rvm_'
|
169
|
+
set -o xtrace
|
170
|
+
;;
|
169
171
|
--help|*) usage ;;
|
170
172
|
esac
|
171
173
|
done
|
172
174
|
|
173
|
-
if [[ -z "$rvm_prefix" ]] ; then
|
175
|
+
if [[ -z "${rvm_prefix:-""}" ]] ; then
|
174
176
|
__rvm_load_rvmrc
|
175
177
|
if [[ "$rvm_selfcontained" = "0" ]] ; then
|
176
178
|
rvm_prefix="${rvm_prefix:-"/usr/local/"}"
|
@@ -179,7 +181,9 @@ if [[ -z "$rvm_prefix" ]] ; then
|
|
179
181
|
fi
|
180
182
|
fi
|
181
183
|
|
182
|
-
if [[ -z "$rvm_path" ]] ; then
|
184
|
+
if [[ -z "${rvm_path:-""}" ]] ; then
|
185
|
+
rvm_path="${rvm_prefix}rvm"
|
186
|
+
fi
|
183
187
|
|
184
188
|
source scripts/initialize
|
185
189
|
|
@@ -233,7 +237,7 @@ else
|
|
233
237
|
|
234
238
|
fi
|
235
239
|
|
236
|
-
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"}" )
|
240
|
+
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"}" "$rvm_path/bin" )
|
237
241
|
|
238
242
|
for directory in "${directories[@]}" ; do
|
239
243
|
|
@@ -303,11 +307,11 @@ chmod +x "${rvm_bin_path:-"$rvm_path/bin"}"/* # TODO: this is quite suboptimal.
|
|
303
307
|
#
|
304
308
|
# RC Files
|
305
309
|
#
|
306
|
-
if [[
|
310
|
+
if [[ ${rvm_auto_flag:-0} -eq 1 ]] ; then
|
307
311
|
|
308
312
|
printf "Checking rc files... ($rvm_rc_files)"
|
309
313
|
|
310
|
-
if [[
|
314
|
+
if [[ ${rvm_loaded_flag:-0} -ne 1 ]] ; then
|
311
315
|
|
312
316
|
for rcfile in $(printf $rvm_rc_files) ; do
|
313
317
|
|
@@ -492,22 +496,16 @@ fi
|
|
492
496
|
#
|
493
497
|
# End of gemset migration.
|
494
498
|
#
|
499
|
+
declare -a files
|
500
|
+
|
495
501
|
printf "\n Correct permissions for base binaries in $rvm_bin_path..."
|
496
502
|
|
497
503
|
mkdir -p "${rvm_bin_path:-"$rvm_path/bin"}"
|
498
504
|
|
499
|
-
|
500
|
-
|
501
|
-
[[ -s "${rvm_bin_path:-"$rvm_path/bin"}/$file" ]] && chmod +x "${rvm_bin_path:-"$rvm_path/bin"}/$file"
|
502
|
-
|
503
|
-
done
|
504
|
-
|
505
|
-
# Cleanup any .swp files that might have appeared.
|
506
|
-
files=($( find "$rvm_path/" -mindepth 1 -maxdepth 2 -iname '*.swp' -type f ))
|
507
|
-
|
505
|
+
files=(rvm rvmsudo rvm-shell rvm-auto-ruby)
|
508
506
|
for file in "${files[@]}" ; do
|
509
507
|
|
510
|
-
[[ -
|
508
|
+
[[ -s "${rvm_bin_path:-"$rvm_path/bin"}/$file" ]] && chmod +x "${rvm_bin_path:-"$rvm_path/bin"}/$file"
|
511
509
|
|
512
510
|
done
|
513
511
|
|
@@ -523,7 +521,25 @@ for file in "${files[@]//.\/}" ; do
|
|
523
521
|
|
524
522
|
done
|
525
523
|
|
526
|
-
|
524
|
+
files=($( find "$rvm_path/" -mindepth 1 -maxdepth 2 -iname '*.swp' -type f ))
|
525
|
+
|
526
|
+
if [[ ${#files[@]} -gt 0 ]] ; then
|
527
|
+
|
528
|
+
printf "\n Cleanup any .swp files."
|
529
|
+
|
530
|
+
for file in "${files[@]}" ; do
|
531
|
+
|
532
|
+
if [[ -f "$file" ]] ; then
|
533
|
+
rm -f "$file"
|
534
|
+
fi
|
535
|
+
|
536
|
+
done
|
537
|
+
fi
|
538
|
+
|
539
|
+
if [[ $upgrade_flag -eq 0 ]] ; then
|
540
|
+
chmod +x ./script/notes # Sometimes things don't clone properly :/
|
541
|
+
./scripts/notes
|
542
|
+
fi
|
527
543
|
|
528
544
|
name="$(awk -F= '/^[[:space:]]*name/{print $2}' ~/.gitconfig 2>/dev/null)"
|
529
545
|
|
@@ -532,7 +548,7 @@ if [[ ${upgrade_flag:-0} -eq 1 ]] ; then
|
|
532
548
|
upgrade_notes
|
533
549
|
|
534
550
|
check_rubyopt_conditions
|
535
|
-
|
551
|
+
|
536
552
|
regenerate_wrappers
|
537
553
|
|
538
554
|
printf "\nUpgrade of RVM in $rvm_path/ is complete.\n\n"
|
data/scripts/list
CHANGED
data/scripts/repair
CHANGED
@@ -3,17 +3,47 @@
|
|
3
3
|
source "$rvm_path/scripts/base"
|
4
4
|
|
5
5
|
usage() {
|
6
|
-
|
7
|
-
|
6
|
+
printf "
|
7
|
+
Usage:
|
8
|
+
|
9
|
+
rvm repair [option]
|
10
|
+
|
11
|
+
Options:
|
12
|
+
wrappers - Repair wrappers
|
13
|
+
symlinks - Repair symlinks
|
14
|
+
environments - Repair environments
|
15
|
+
archives - Repair archives
|
16
|
+
all - Repair all of the above
|
17
|
+
|
18
|
+
"
|
8
19
|
}
|
9
20
|
|
10
21
|
repair_wrappers() {
|
11
|
-
|
22
|
+
|
23
|
+
local wrapper_ruby_name
|
24
|
+
|
25
|
+
"$rvm_path/scripts/log" "info" "Regenerating all wrappers..."
|
26
|
+
|
27
|
+
while read -r wrapper_ruby_name ; do
|
28
|
+
|
29
|
+
"$rvm_path/scripts/log" "info" \
|
30
|
+
"Regenerating wrappers for $wrapper_ruby_name"
|
31
|
+
|
32
|
+
__rvm_run "wrappers.regenerate" \
|
33
|
+
"\"$rvm_path/scripts/wrapper\" '$wrapper_ruby_name'"
|
34
|
+
|
35
|
+
done < <("$rvm_path/scripts/list" gemsets strings)
|
36
|
+
|
37
|
+
"$rvm_path/scripts/log" "info" "Wrappers regenerated"
|
38
|
+
|
12
39
|
}
|
13
40
|
|
14
41
|
# Removes stale symlinks in $rvm_bin_path, likely
|
15
42
|
# related to wrappers.
|
16
43
|
repair_symlinks() {
|
44
|
+
|
45
|
+
"$rvm_path/scripts/log" "info" "Repairing symlinks..."
|
46
|
+
|
17
47
|
(
|
18
48
|
builtin cd "${rvm_bin_path:-"$rvm_path/bin"}"
|
19
49
|
|
@@ -24,19 +54,23 @@ repair_symlinks() {
|
|
24
54
|
if [[ -f "$executable_name" ]] ; then
|
25
55
|
|
26
56
|
"$rvm_path/scripts/log" "info" \
|
27
|
-
"
|
57
|
+
"removing stale symlink from $(basename "$executable_name")"
|
28
58
|
|
29
59
|
\rm -f "$executable_name"
|
30
60
|
|
31
61
|
fi
|
32
62
|
done
|
33
63
|
)
|
64
|
+
|
65
|
+
"$rvm_path/scripts/log" "info" "Symlinks repaired"
|
34
66
|
}
|
35
67
|
|
36
68
|
# Regenerates each symlink file.
|
37
69
|
repair_environments() {
|
38
70
|
local environment_name environments
|
39
71
|
|
72
|
+
"$rvm_path/scripts/log" "info" "Regenerating environments..."
|
73
|
+
|
40
74
|
environments=($(cd "$rvm_path/environments" ; find . -maxdepth 1 -mindepth 1 -type f))
|
41
75
|
|
42
76
|
for environment_name in "${environments[@]//.\/}" ; do
|
@@ -57,12 +91,17 @@ repair_environments() {
|
|
57
91
|
)
|
58
92
|
|
59
93
|
done
|
94
|
+
|
95
|
+
"$rvm_path/scripts/log" "info" "Environments regenerated"
|
96
|
+
|
97
|
+
return 0
|
60
98
|
}
|
61
99
|
|
62
100
|
# Removes archives that have incorrect md5 sums.
|
63
101
|
repair_archives() {
|
64
102
|
|
65
103
|
local archive_file archives stored_md5sum
|
104
|
+
"$rvm_path/scripts/log" "info" "Repairing archives..."
|
66
105
|
|
67
106
|
archives=($(cd "${rvm_archives_path:-"$rvm_path/archives"}" ; find . -maxdepth 1 -mindepth 1 -type f))
|
68
107
|
|
@@ -83,6 +122,8 @@ repair_archives() {
|
|
83
122
|
fi
|
84
123
|
done
|
85
124
|
|
125
|
+
"$rvm_path/scripts/log" "info" "Archives repaired"
|
126
|
+
|
86
127
|
return 0
|
87
128
|
}
|
88
129
|
|
@@ -96,15 +137,13 @@ repair_all() {
|
|
96
137
|
|
97
138
|
repair_wrappers
|
98
139
|
|
99
|
-
"$rvm_path/scripts/log" "info" \
|
100
|
-
"symlinks, archives and environments have been repaired."
|
101
|
-
|
102
140
|
return 0
|
103
141
|
}
|
104
142
|
|
105
143
|
args=($*)
|
106
|
-
action="${args[
|
107
|
-
args
|
144
|
+
action="${args[$__array_start]}"
|
145
|
+
args[$__array_start]=""
|
146
|
+
args=(${args[@]})
|
108
147
|
|
109
148
|
if [[ -z "$action" ]]; then
|
110
149
|
usage
|
@@ -117,7 +156,8 @@ case "$action" in
|
|
117
156
|
environments) repair_environments ;;
|
118
157
|
archives) repair_archives ;;
|
119
158
|
wrappers) repair_wrappers ;;
|
120
|
-
|
159
|
+
help) usage ;;
|
160
|
+
*) usage >&2 ; exit 1 ;;
|
121
161
|
esac
|
122
162
|
|
123
163
|
exit $?
|
data/scripts/rvm-install
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
|
-
|
3
|
+
set -o errtrace
|
4
|
+
export PS4='+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }'
|
4
5
|
|
5
6
|
if [[ -z "$rvm_selfcontained" ]]; then
|
6
7
|
if [[ "root" = "$(whoami)" ]] || [[ -n "$rvm_prefix" && "$rvm_prefix" != "$HOME"/* ]]; then
|
@@ -13,6 +14,7 @@ fi
|
|
13
14
|
unset rvm_auto_flag
|
14
15
|
|
15
16
|
install_source_path="$(dirname "$0" | sed 's#\/scripts$##')"
|
17
|
+
|
16
18
|
if [[ -d "$install_source_path/scripts" ]] && [[ -s "$install_source_path/scripts/utility" ]] ; then
|
17
19
|
builtin cd "$install_source_path"
|
18
20
|
fi
|
@@ -34,21 +36,12 @@ usage() {
|
|
34
36
|
}
|
35
37
|
|
36
38
|
check_rubyopt_conditions() {
|
37
|
-
if [[ -n "$RUBYOPT" ]]; then
|
39
|
+
if [[ -n "${RUBYOPT:-""}" ]]; then
|
38
40
|
printf "\n\nWARNING: You have RUBYOPT set in your current environment. This may interfere with normal rvm"
|
39
41
|
printf "\n operation. If errors show up, please try unsetting RUBYOPT first.\n"
|
40
42
|
fi
|
41
43
|
}
|
42
44
|
|
43
|
-
# Regenerates a users wrappers as part of the update.
|
44
|
-
regenerate_wrappers() {
|
45
|
-
printf "\n"
|
46
|
-
if command -v __rvm_regenerate_wrappers >/dev/null; then
|
47
|
-
__rvm_regenerate_wrappers
|
48
|
-
fi
|
49
|
-
printf "\n"
|
50
|
-
}
|
51
|
-
|
52
45
|
andand_return_instructions() {
|
53
46
|
printf "
|
54
47
|
This means that if you see something like:
|
@@ -158,7 +151,8 @@ Upgrade Notes
|
|
158
151
|
"
|
159
152
|
}
|
160
153
|
|
161
|
-
|
154
|
+
set -o noclobber
|
155
|
+
set -o nounset
|
162
156
|
|
163
157
|
while [[ $# -gt 0 ]] ; do
|
164
158
|
token="$1" ; shift
|
@@ -166,11 +160,19 @@ while [[ $# -gt 0 ]] ; do
|
|
166
160
|
--auto) rvm_auto_flag=1 ;;
|
167
161
|
--prefix) rvm_prefix="$1" ; shift ;;
|
168
162
|
--version) rvm_path="$PWD" ; __rvm_version ; unset rvm_path ; exit ;;
|
163
|
+
--debug)
|
164
|
+
set -o verbose
|
165
|
+
;;
|
166
|
+
--trace)
|
167
|
+
echo "$*"
|
168
|
+
env | grep '^rvm_'
|
169
|
+
set -o xtrace
|
170
|
+
;;
|
169
171
|
--help|*) usage ;;
|
170
172
|
esac
|
171
173
|
done
|
172
174
|
|
173
|
-
if [[ -z "$rvm_prefix" ]] ; then
|
175
|
+
if [[ -z "${rvm_prefix:-""}" ]] ; then
|
174
176
|
__rvm_load_rvmrc
|
175
177
|
if [[ "$rvm_selfcontained" = "0" ]] ; then
|
176
178
|
rvm_prefix="${rvm_prefix:-"/usr/local/"}"
|
@@ -179,7 +181,9 @@ if [[ -z "$rvm_prefix" ]] ; then
|
|
179
181
|
fi
|
180
182
|
fi
|
181
183
|
|
182
|
-
if [[ -z "$rvm_path" ]] ; then
|
184
|
+
if [[ -z "${rvm_path:-""}" ]] ; then
|
185
|
+
rvm_path="${rvm_prefix}rvm"
|
186
|
+
fi
|
183
187
|
|
184
188
|
source scripts/initialize
|
185
189
|
|
@@ -233,7 +237,7 @@ else
|
|
233
237
|
|
234
238
|
fi
|
235
239
|
|
236
|
-
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"}" )
|
240
|
+
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"}" "$rvm_path/bin" )
|
237
241
|
|
238
242
|
for directory in "${directories[@]}" ; do
|
239
243
|
|
@@ -303,11 +307,11 @@ chmod +x "${rvm_bin_path:-"$rvm_path/bin"}"/* # TODO: this is quite suboptimal.
|
|
303
307
|
#
|
304
308
|
# RC Files
|
305
309
|
#
|
306
|
-
if [[
|
310
|
+
if [[ ${rvm_auto_flag:-0} -eq 1 ]] ; then
|
307
311
|
|
308
312
|
printf "Checking rc files... ($rvm_rc_files)"
|
309
313
|
|
310
|
-
if [[
|
314
|
+
if [[ ${rvm_loaded_flag:-0} -ne 1 ]] ; then
|
311
315
|
|
312
316
|
for rcfile in $(printf $rvm_rc_files) ; do
|
313
317
|
|
@@ -492,22 +496,16 @@ fi
|
|
492
496
|
#
|
493
497
|
# End of gemset migration.
|
494
498
|
#
|
499
|
+
declare -a files
|
500
|
+
|
495
501
|
printf "\n Correct permissions for base binaries in $rvm_bin_path..."
|
496
502
|
|
497
503
|
mkdir -p "${rvm_bin_path:-"$rvm_path/bin"}"
|
498
504
|
|
499
|
-
|
500
|
-
|
501
|
-
[[ -s "${rvm_bin_path:-"$rvm_path/bin"}/$file" ]] && chmod +x "${rvm_bin_path:-"$rvm_path/bin"}/$file"
|
502
|
-
|
503
|
-
done
|
504
|
-
|
505
|
-
# Cleanup any .swp files that might have appeared.
|
506
|
-
files=($( find "$rvm_path/" -mindepth 1 -maxdepth 2 -iname '*.swp' -type f ))
|
507
|
-
|
505
|
+
files=(rvm rvmsudo rvm-shell rvm-auto-ruby)
|
508
506
|
for file in "${files[@]}" ; do
|
509
507
|
|
510
|
-
[[ -
|
508
|
+
[[ -s "${rvm_bin_path:-"$rvm_path/bin"}/$file" ]] && chmod +x "${rvm_bin_path:-"$rvm_path/bin"}/$file"
|
511
509
|
|
512
510
|
done
|
513
511
|
|
@@ -523,7 +521,25 @@ for file in "${files[@]//.\/}" ; do
|
|
523
521
|
|
524
522
|
done
|
525
523
|
|
526
|
-
|
524
|
+
files=($( find "$rvm_path/" -mindepth 1 -maxdepth 2 -iname '*.swp' -type f ))
|
525
|
+
|
526
|
+
if [[ ${#files[@]} -gt 0 ]] ; then
|
527
|
+
|
528
|
+
printf "\n Cleanup any .swp files."
|
529
|
+
|
530
|
+
for file in "${files[@]}" ; do
|
531
|
+
|
532
|
+
if [[ -f "$file" ]] ; then
|
533
|
+
rm -f "$file"
|
534
|
+
fi
|
535
|
+
|
536
|
+
done
|
537
|
+
fi
|
538
|
+
|
539
|
+
if [[ $upgrade_flag -eq 0 ]] ; then
|
540
|
+
chmod +x ./script/notes # Sometimes things don't clone properly :/
|
541
|
+
./scripts/notes
|
542
|
+
fi
|
527
543
|
|
528
544
|
name="$(awk -F= '/^[[:space:]]*name/{print $2}' ~/.gitconfig 2>/dev/null)"
|
529
545
|
|
@@ -532,7 +548,7 @@ if [[ ${upgrade_flag:-0} -eq 1 ]] ; then
|
|
532
548
|
upgrade_notes
|
533
549
|
|
534
550
|
check_rubyopt_conditions
|
535
|
-
|
551
|
+
|
536
552
|
regenerate_wrappers
|
537
553
|
|
538
554
|
printf "\nUpgrade of RVM in $rvm_path/ is complete.\n\n"
|
data/scripts/selector
CHANGED
@@ -428,26 +428,20 @@ __rvm_ruby_string() {
|
|
428
428
|
rvm_ruby_revision=${rvm_ruby_revision:-""}
|
429
429
|
rvm_ruby_tag=${rvm_ruby_tag:-""}
|
430
430
|
|
431
|
-
if echo "$rvm_ruby_string" | \grep -q "${rvm_gemset_separator:-"@"}" ; then
|
432
|
-
rvm_gemset_name="${rvm_ruby_string/*${rvm_gemset_separator:-"@"}/}"
|
433
|
-
rvm_ruby_string="${rvm_ruby_string/${rvm_gemset_separator:-"@"}*/}"
|
434
|
-
rvm_sticky_flag=1
|
435
|
-
fi
|
436
|
-
|
437
431
|
# Alias'd rubies
|
438
432
|
if [[ ${rvm_expanding_aliases:-0} -eq 0 && -n ${rvm_ruby_string:-""} && $rvm_ruby_string != "system" ]]; then
|
439
|
-
|
440
433
|
if expanded_alias_name="$("$rvm_path/scripts/alias" show "$rvm_ruby_string" 2>/dev/null)" && [[ -n "$expanded_alias_name" ]] ; then
|
441
|
-
|
442
434
|
rvm_ruby_string="$expanded_alias_name"
|
443
|
-
|
444
435
|
elif [[ "$rvm_ruby_string" = default ]]; then
|
445
|
-
|
446
436
|
# Default is not a known value. Instead, we need to therefore set it to system.
|
447
437
|
rvm_ruby_string="system"
|
448
|
-
|
449
438
|
fi
|
450
|
-
|
439
|
+
fi
|
440
|
+
|
441
|
+
if echo "$rvm_ruby_string" | \grep -q "${rvm_gemset_separator:-"@"}" ; then
|
442
|
+
rvm_gemset_name="${rvm_ruby_string/*${rvm_gemset_separator:-"@"}/}"
|
443
|
+
rvm_ruby_string="${rvm_ruby_string/${rvm_gemset_separator:-"@"}*/}"
|
444
|
+
rvm_sticky_flag=1
|
451
445
|
fi
|
452
446
|
|
453
447
|
ruby_string=${rvm_ruby_string/${rvm_gemset_separator:-"@"}*/}
|
data/scripts/update
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
|
-
|
3
|
+
set -o errtrace
|
4
|
+
export PS4='+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }'
|
4
5
|
|
5
6
|
if [[ -z "$rvm_selfcontained" ]]; then
|
6
7
|
if [[ "root" = "$(whoami)" ]] || [[ -n "$rvm_prefix" && "$rvm_prefix" != "$HOME"/* ]]; then
|
@@ -13,6 +14,7 @@ fi
|
|
13
14
|
unset rvm_auto_flag
|
14
15
|
|
15
16
|
install_source_path="$(dirname "$0" | sed 's#\/scripts$##')"
|
17
|
+
|
16
18
|
if [[ -d "$install_source_path/scripts" ]] && [[ -s "$install_source_path/scripts/utility" ]] ; then
|
17
19
|
builtin cd "$install_source_path"
|
18
20
|
fi
|
@@ -34,21 +36,12 @@ usage() {
|
|
34
36
|
}
|
35
37
|
|
36
38
|
check_rubyopt_conditions() {
|
37
|
-
if [[ -n "$RUBYOPT" ]]; then
|
39
|
+
if [[ -n "${RUBYOPT:-""}" ]]; then
|
38
40
|
printf "\n\nWARNING: You have RUBYOPT set in your current environment. This may interfere with normal rvm"
|
39
41
|
printf "\n operation. If errors show up, please try unsetting RUBYOPT first.\n"
|
40
42
|
fi
|
41
43
|
}
|
42
44
|
|
43
|
-
# Regenerates a users wrappers as part of the update.
|
44
|
-
regenerate_wrappers() {
|
45
|
-
printf "\n"
|
46
|
-
if command -v __rvm_regenerate_wrappers >/dev/null; then
|
47
|
-
__rvm_regenerate_wrappers
|
48
|
-
fi
|
49
|
-
printf "\n"
|
50
|
-
}
|
51
|
-
|
52
45
|
andand_return_instructions() {
|
53
46
|
printf "
|
54
47
|
This means that if you see something like:
|
@@ -158,7 +151,8 @@ Upgrade Notes
|
|
158
151
|
"
|
159
152
|
}
|
160
153
|
|
161
|
-
|
154
|
+
set -o noclobber
|
155
|
+
set -o nounset
|
162
156
|
|
163
157
|
while [[ $# -gt 0 ]] ; do
|
164
158
|
token="$1" ; shift
|
@@ -166,11 +160,19 @@ while [[ $# -gt 0 ]] ; do
|
|
166
160
|
--auto) rvm_auto_flag=1 ;;
|
167
161
|
--prefix) rvm_prefix="$1" ; shift ;;
|
168
162
|
--version) rvm_path="$PWD" ; __rvm_version ; unset rvm_path ; exit ;;
|
163
|
+
--debug)
|
164
|
+
set -o verbose
|
165
|
+
;;
|
166
|
+
--trace)
|
167
|
+
echo "$*"
|
168
|
+
env | grep '^rvm_'
|
169
|
+
set -o xtrace
|
170
|
+
;;
|
169
171
|
--help|*) usage ;;
|
170
172
|
esac
|
171
173
|
done
|
172
174
|
|
173
|
-
if [[ -z "$rvm_prefix" ]] ; then
|
175
|
+
if [[ -z "${rvm_prefix:-""}" ]] ; then
|
174
176
|
__rvm_load_rvmrc
|
175
177
|
if [[ "$rvm_selfcontained" = "0" ]] ; then
|
176
178
|
rvm_prefix="${rvm_prefix:-"/usr/local/"}"
|
@@ -179,7 +181,9 @@ if [[ -z "$rvm_prefix" ]] ; then
|
|
179
181
|
fi
|
180
182
|
fi
|
181
183
|
|
182
|
-
if [[ -z "$rvm_path" ]] ; then
|
184
|
+
if [[ -z "${rvm_path:-""}" ]] ; then
|
185
|
+
rvm_path="${rvm_prefix}rvm"
|
186
|
+
fi
|
183
187
|
|
184
188
|
source scripts/initialize
|
185
189
|
|
@@ -233,7 +237,7 @@ else
|
|
233
237
|
|
234
238
|
fi
|
235
239
|
|
236
|
-
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"}" )
|
240
|
+
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"}" "$rvm_path/bin" )
|
237
241
|
|
238
242
|
for directory in "${directories[@]}" ; do
|
239
243
|
|
@@ -303,11 +307,11 @@ chmod +x "${rvm_bin_path:-"$rvm_path/bin"}"/* # TODO: this is quite suboptimal.
|
|
303
307
|
#
|
304
308
|
# RC Files
|
305
309
|
#
|
306
|
-
if [[
|
310
|
+
if [[ ${rvm_auto_flag:-0} -eq 1 ]] ; then
|
307
311
|
|
308
312
|
printf "Checking rc files... ($rvm_rc_files)"
|
309
313
|
|
310
|
-
if [[
|
314
|
+
if [[ ${rvm_loaded_flag:-0} -ne 1 ]] ; then
|
311
315
|
|
312
316
|
for rcfile in $(printf $rvm_rc_files) ; do
|
313
317
|
|
@@ -492,22 +496,16 @@ fi
|
|
492
496
|
#
|
493
497
|
# End of gemset migration.
|
494
498
|
#
|
499
|
+
declare -a files
|
500
|
+
|
495
501
|
printf "\n Correct permissions for base binaries in $rvm_bin_path..."
|
496
502
|
|
497
503
|
mkdir -p "${rvm_bin_path:-"$rvm_path/bin"}"
|
498
504
|
|
499
|
-
|
500
|
-
|
501
|
-
[[ -s "${rvm_bin_path:-"$rvm_path/bin"}/$file" ]] && chmod +x "${rvm_bin_path:-"$rvm_path/bin"}/$file"
|
502
|
-
|
503
|
-
done
|
504
|
-
|
505
|
-
# Cleanup any .swp files that might have appeared.
|
506
|
-
files=($( find "$rvm_path/" -mindepth 1 -maxdepth 2 -iname '*.swp' -type f ))
|
507
|
-
|
505
|
+
files=(rvm rvmsudo rvm-shell rvm-auto-ruby)
|
508
506
|
for file in "${files[@]}" ; do
|
509
507
|
|
510
|
-
[[ -
|
508
|
+
[[ -s "${rvm_bin_path:-"$rvm_path/bin"}/$file" ]] && chmod +x "${rvm_bin_path:-"$rvm_path/bin"}/$file"
|
511
509
|
|
512
510
|
done
|
513
511
|
|
@@ -523,7 +521,25 @@ for file in "${files[@]//.\/}" ; do
|
|
523
521
|
|
524
522
|
done
|
525
523
|
|
526
|
-
|
524
|
+
files=($( find "$rvm_path/" -mindepth 1 -maxdepth 2 -iname '*.swp' -type f ))
|
525
|
+
|
526
|
+
if [[ ${#files[@]} -gt 0 ]] ; then
|
527
|
+
|
528
|
+
printf "\n Cleanup any .swp files."
|
529
|
+
|
530
|
+
for file in "${files[@]}" ; do
|
531
|
+
|
532
|
+
if [[ -f "$file" ]] ; then
|
533
|
+
rm -f "$file"
|
534
|
+
fi
|
535
|
+
|
536
|
+
done
|
537
|
+
fi
|
538
|
+
|
539
|
+
if [[ $upgrade_flag -eq 0 ]] ; then
|
540
|
+
chmod +x ./script/notes # Sometimes things don't clone properly :/
|
541
|
+
./scripts/notes
|
542
|
+
fi
|
527
543
|
|
528
544
|
name="$(awk -F= '/^[[:space:]]*name/{print $2}' ~/.gitconfig 2>/dev/null)"
|
529
545
|
|
@@ -532,7 +548,7 @@ if [[ ${upgrade_flag:-0} -eq 1 ]] ; then
|
|
532
548
|
upgrade_notes
|
533
549
|
|
534
550
|
check_rubyopt_conditions
|
535
|
-
|
551
|
+
|
536
552
|
regenerate_wrappers
|
537
553
|
|
538
554
|
printf "\nUpgrade of RVM in $rvm_path/ is complete.\n\n"
|
data/scripts/utility
CHANGED
@@ -242,11 +242,14 @@ __rvm_run() {
|
|
242
242
|
fi
|
243
243
|
|
244
244
|
if [[ ${rvm_debug_flag:-0} -gt 0 ]] ; then
|
245
|
-
"$rvm_path/scripts/log" "debug"
|
246
|
-
"Executing: $command"
|
245
|
+
"$rvm_path/scripts/log" "debug" "Executing: $command"
|
247
246
|
fi
|
248
247
|
|
249
|
-
|
248
|
+
if [[ -n "${rvm_ruby_string:-""}" ]] ; then
|
249
|
+
path="${rvm_log_path:-"$rvm_path/log"}/$rvm_ruby_string"
|
250
|
+
else
|
251
|
+
path="${rvm_log_path:-"$rvm_path/log"}"
|
252
|
+
fi
|
250
253
|
|
251
254
|
log="$path/$name.log"
|
252
255
|
|
@@ -256,7 +259,7 @@ __rvm_run() {
|
|
256
259
|
|
257
260
|
\touch "$log" "${log/%.log/.error.log}" # for zsh :(
|
258
261
|
|
259
|
-
printf "[$(date +'%Y-%m-%d %H:%M:%S')] $command" | \
|
262
|
+
printf "[$(date +'%Y-%m-%d %H:%M:%S')] $command\n" | \
|
260
263
|
\tee "$log" \
|
261
264
|
>> "${log/%log/error.log}"
|
262
265
|
|
@@ -1370,11 +1373,3 @@ __rvm_expand_ruby_string() {
|
|
1370
1373
|
|
1371
1374
|
return $?
|
1372
1375
|
}
|
1373
|
-
|
1374
|
-
__rvm_regenerate_wrappers() {
|
1375
|
-
echo "Regenerating all wrappers..."
|
1376
|
-
while read -r wrapper_ruby_name; do
|
1377
|
-
__rvm_run "wrappers.regenerate" "\"$rvm_path/scripts/wrapper\" '$wrapper_ruby_name'"
|
1378
|
-
done < <(rvm list gemsets strings)
|
1379
|
-
unset wrapper_ruby_name
|
1380
|
-
}
|
data/scripts/wrapper
CHANGED
@@ -34,7 +34,7 @@ wrap() {
|
|
34
34
|
if [[ "root" = "$USER" ]] ; then
|
35
35
|
path="${rvm_path:-"/usr/local/rvm"}"
|
36
36
|
else
|
37
|
-
path="
|
37
|
+
path="$HOME/.rvm"
|
38
38
|
fi
|
39
39
|
|
40
40
|
printf "#!/usr/bin/env bash
|
@@ -43,18 +43,21 @@ if [[ -s \"$path/environments/${environment_identifier}\" ]] ; then
|
|
43
43
|
\\. \"$path/environments/${environment_identifier}\"
|
44
44
|
exec $binary_name \"\$@\"
|
45
45
|
else
|
46
|
-
echo \"ERROR: Missing RVM environment file: '$path/environments/${environment_identifier}'\"
|
46
|
+
echo \"ERROR: Missing RVM environment file: '$path/environments/${environment_identifier}'\" >&2
|
47
47
|
exit 1
|
48
48
|
fi
|
49
49
|
" > "$file_name"
|
50
50
|
|
51
|
-
if [[ -f "$file_name" ]] ; then
|
51
|
+
if [[ -f "$file_name" ]] ; then
|
52
|
+
chmod +x "$file_name"
|
53
|
+
fi
|
52
54
|
|
53
55
|
return 0
|
54
56
|
|
55
57
|
else
|
56
58
|
|
57
|
-
"$rvm_path/scripts/log" "error"
|
59
|
+
"$rvm_path/scripts/log" "error" \
|
60
|
+
"wrap() : file_name unkown variable for wrap()."
|
58
61
|
|
59
62
|
return 1
|
60
63
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rvm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 11
|
10
|
+
version: 1.0.11
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Wayne E. Seguin
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-09-
|
18
|
+
date: 2010-09-20 00:00:00 -04:00
|
19
19
|
default_executable: rvm-install
|
20
20
|
dependencies: []
|
21
21
|
|