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/scripts/wrapper
CHANGED
@@ -1,22 +1,39 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
3
|
default_flag="$rvm_default_flag"
|
4
|
-
# Prevent
|
4
|
+
# Prevent recursion
|
5
5
|
unset rvm_default_flag rvm_wrapper_name
|
6
6
|
|
7
7
|
source "$rvm_scripts_path/base"
|
8
8
|
|
9
|
+
usage() {
|
10
|
+
printf "
|
11
|
+
Usage:
|
12
|
+
|
13
|
+
rvm wrapper [ruby_string] [wrapper_prefix] [binary[ binary[ ...]]]
|
14
|
+
|
15
|
+
Binaries
|
16
|
+
|
17
|
+
ruby, gem, rake, irb, rdoc, ri, testrb
|
18
|
+
|
19
|
+
For more information, see 'rvm help wrapper'
|
20
|
+
"
|
21
|
+
}
|
22
|
+
|
9
23
|
full_binary_name() {
|
10
24
|
echo "$binary_name" | __rvm_strip
|
11
25
|
}
|
12
26
|
|
13
27
|
wrap() {
|
14
|
-
|
15
|
-
|
28
|
+
if [[ -n "${file_name:-""}" ]] ;then
|
29
|
+
mkdir -p "$(dirname "$file_name")"
|
30
|
+
|
31
|
+
rm -f "$file_name"
|
16
32
|
|
17
|
-
|
18
|
-
|
19
|
-
|
33
|
+
printf "#!/usr/bin/env bash
|
34
|
+
|
35
|
+
if [[ -s \"$rvm_path/environments/${environment_identifier}\" ]] ; then
|
36
|
+
\\. \"$rvm_path/environments/${environment_identifier}\"
|
20
37
|
exec $binary_name \"\$@\"
|
21
38
|
else
|
22
39
|
echo \"ERROR: Missing RVM environment file: '${rvm_environments_path}/${environment_identifier}'\"
|
@@ -24,7 +41,13 @@ else
|
|
24
41
|
fi
|
25
42
|
" > "$file_name"
|
26
43
|
|
27
|
-
|
44
|
+
if [[ -f "$file_name" ]] ; then chmod +x "$file_name" ; fi
|
45
|
+
|
46
|
+
return 0
|
47
|
+
else
|
48
|
+
"$rvm_path/scripts/log" "error" "wrap() : file_name unset variable."
|
49
|
+
return 1
|
50
|
+
fi
|
28
51
|
}
|
29
52
|
|
30
53
|
symlink_binary() {
|
@@ -33,6 +56,7 @@ symlink_binary() {
|
|
33
56
|
# we then symlink it into place.
|
34
57
|
if wrap_binary && [[ -f "$file_name" ]]; then
|
35
58
|
rm -f "${rvm_bin_path}/${prefix}_${binary_name}"
|
59
|
+
|
36
60
|
ln -fs "$file_name" "${rvm_bin_path}/${prefix}_${binary_name}"
|
37
61
|
fi
|
38
62
|
}
|
@@ -47,24 +71,26 @@ wrap_binary() {
|
|
47
71
|
fi
|
48
72
|
}
|
49
73
|
|
50
|
-
usage() {
|
51
|
-
printf "Usage: 'rvm wrapper [ruby_string] [wrapper_prefix] [binary[ binary[ ...]]]'\n"
|
52
|
-
printf " Where binary defaults to ruby, gem, rake, irb, rdoc, ri, testrb\n"
|
53
|
-
printf " For more information, see 'rvm help wrapper'\n"
|
54
|
-
}
|
55
|
-
|
56
74
|
# Empty ruby string: show usage and exit.
|
57
|
-
if [[
|
75
|
+
if [[ "$#" -eq 0 ]] ; then
|
76
|
+
usage
|
77
|
+
exit 1
|
78
|
+
else
|
79
|
+
ruby_string="${1:-""}"
|
80
|
+
shift
|
81
|
+
fi
|
82
|
+
|
83
|
+
if [[ "$#" -gt 0 ]] ; then
|
84
|
+
prefix="${1:-""}"
|
85
|
+
shift
|
86
|
+
fi
|
58
87
|
|
59
|
-
|
88
|
+
binaries=($(echo "$@"))
|
60
89
|
override_check=0
|
61
|
-
prefix="${1:-""}"
|
62
|
-
[[ "$#" -gt 0 ]] && shift
|
63
|
-
binaries="$(echo "$@" | __rvm_strip)"
|
64
90
|
|
65
91
|
# Default the list of binaries to those we use regularily.
|
66
|
-
if [[
|
67
|
-
binaries=
|
92
|
+
if [[ ${#binaries[@]} -eq 0 ]] ; then
|
93
|
+
binaries=(ruby gem irb ri rdoc rake erb testrb)
|
68
94
|
fi
|
69
95
|
|
70
96
|
# Use the correct ruby.
|
@@ -76,31 +102,46 @@ environment_identifier="$(__rvm_environment_identifier)"
|
|
76
102
|
|
77
103
|
# For each binary, we want to generate the wrapper / symlink
|
78
104
|
# it to the existing wrapper if needed.
|
79
|
-
for binary_name in $binaries; do
|
105
|
+
for binary_name in "${binaries[@]}"; do
|
106
|
+
|
80
107
|
file_name="${rvm_wrappers_path}/${environment_identifier}/${binary_name}"
|
81
108
|
|
82
109
|
if [[ -z "$prefix" ]] ; then
|
110
|
+
|
83
111
|
override_check=1
|
112
|
+
|
84
113
|
wrap_binary
|
114
|
+
|
85
115
|
# Symlink it into place.
|
86
116
|
if [[ -f "$file_name" ]]; then
|
117
|
+
|
87
118
|
if [[ "$binary_name" == "ruby" ]] ; then
|
88
119
|
destination="$rvm_bin_path/$environment_identifier"
|
89
120
|
else
|
90
121
|
destination="$rvm_bin_path/${binary_name}-${environment_identifier}"
|
91
122
|
fi
|
123
|
+
|
92
124
|
rm -rf "$destination"
|
125
|
+
|
93
126
|
ln -nsf "$file_name" "$destination"
|
94
127
|
fi; unset destination
|
95
128
|
|
96
129
|
elif [[ "$prefix" == "--no-prefix" ]]; then
|
130
|
+
|
97
131
|
override_check=1
|
132
|
+
|
98
133
|
wrap_binary
|
134
|
+
|
99
135
|
if [[ -f "$file_name" ]]; then
|
136
|
+
|
100
137
|
destination="$rvm_bin_path/$binary_name"
|
101
|
-
|
138
|
+
|
139
|
+
if [[ -s "$destination" ]] ; then
|
140
|
+
rm -rf "$destination"
|
141
|
+
fi
|
142
|
+
|
102
143
|
ln -nsf "$file_name" "$destination"
|
103
|
-
fi; unset destination
|
144
|
+
fi ; unset destination
|
104
145
|
|
105
146
|
else
|
106
147
|
symlink_binary
|
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: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 6
|
10
|
+
version: 1.0.6
|
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-10 00:00:00 -04:00
|
19
19
|
default_executable: rvm-install
|
20
20
|
dependencies: []
|
21
21
|
|