rvm 0.0.59 → 0.0.60
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/install +2 -2
- data/lib/VERSION.yml +1 -1
- data/rvm.gemspec +3 -2
- data/scripts/cli +6 -3
- data/scripts/color +52 -0
- data/scripts/gems +65 -54
- data/scripts/install +2 -2
- data/scripts/rvm +1 -0
- data/scripts/rvm-install +2 -2
- data/scripts/selector +21 -11
- data/scripts/update +2 -2
- data/scripts/utility +1 -2
- metadata +3 -2
data/install
CHANGED
@@ -37,7 +37,7 @@ if [ -z "$rvm_loaded_flag" ] ; then
|
|
37
37
|
if [ ! -e ~/$rcfile ] ; then touch ~/$rcfile ; fi
|
38
38
|
if [ -z "$(awk '/\.rvm\/scripts\/rvm/' ~/$rcfile)" ] ; then
|
39
39
|
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/$rcfile."
|
40
|
-
echo -e "\n# rvm
|
40
|
+
echo -e "\n# rvm-install added line:\nif [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi\n" >> ~/$rcfile
|
41
41
|
fi
|
42
42
|
done
|
43
43
|
fi
|
@@ -53,7 +53,7 @@ for file in ~/.bash_profile ~/.bashrc ~/.zshrc ; do
|
|
53
53
|
|
54
54
|
grep 'rvm\/bin\/rvm' $actual_file > /dev/null
|
55
55
|
if [ $? -eq 0 ] ; then
|
56
|
-
sed -i.orig 's/
|
56
|
+
sed -i.orig 's#rvm/bin/rvm #rvm/scripts/rvm #g' $actual_file
|
57
57
|
rm -f $actual_file.orig
|
58
58
|
fi
|
59
59
|
|
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 = "0.0.
|
8
|
+
s.version = "0.0.60"
|
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{2009-10-
|
12
|
+
s.date = %q{2009-10-18}
|
13
13
|
s.default_executable = %q{rvm-install}
|
14
14
|
s.description = %q{Manages Ruby interpreter installations and switching between them.}
|
15
15
|
s.email = %q{wayneeseguin@gmail.com}
|
@@ -29,6 +29,7 @@ Gem::Specification.new do |s|
|
|
29
29
|
"rvm.gemspec",
|
30
30
|
"scripts/aliases",
|
31
31
|
"scripts/cli",
|
32
|
+
"scripts/color",
|
32
33
|
"scripts/completion",
|
33
34
|
"scripts/functions",
|
34
35
|
"scripts/gems",
|
data/scripts/cli
CHANGED
@@ -5,7 +5,7 @@ function __rvm_meta {
|
|
5
5
|
rvm_meta_author_email="wayneeseguin@gmail.com"
|
6
6
|
rvm_meta_website="http://rvm.beginrescueend.com/"
|
7
7
|
rvm_meta_version="$(cat $rvm_path/lib/VERSION.yml | tail -n 3 | sed 's/^.*: //g' | tr "\n" '.' | sed 's/\.$//')"
|
8
|
-
rvm_meta_updated="2009.10.
|
8
|
+
rvm_meta_updated="2009.10.18"
|
9
9
|
}
|
10
10
|
|
11
11
|
function __rvm_version { __rvm_meta ; echo "rvm $rvm_meta_version ($rvm_meta_updated) [$rvm_meta_website]" ; }
|
@@ -158,8 +158,8 @@ function __rvm_parse_args {
|
|
158
158
|
rvm_ruby_interpreter="${rvm_ruby_interpreter:-current}"
|
159
159
|
;;
|
160
160
|
|
161
|
-
--load|load|dump)
|
162
|
-
rvm_action=gems
|
161
|
+
--load|load|dump|clear)
|
162
|
+
rvm_action="gems"
|
163
163
|
eval "rvm_${rvm_token}_flag=1"
|
164
164
|
;;
|
165
165
|
|
@@ -390,6 +390,9 @@ function __rvm_parse_args {
|
|
390
390
|
elif [ ! -z "$(echo $rvm_token | awk '/^.+%.+$/')" ] ; then
|
391
391
|
rvm_gem_set_name="$(echo $rvm_token | awk -F'%' '{print $2}')"
|
392
392
|
rvm_ruby_string="$(echo $rvm_token | awk -F'%' '{print $1}')"
|
393
|
+
#elif [ ! -z "$(echo $rvm_token | awk '/^[0-9].[0-9]/')" ] ; then
|
394
|
+
elif [[ $rvm_token =~ ^[0-9].[0-9] ]] ; then
|
395
|
+
rvm_ruby_string="$rvm_token"
|
393
396
|
else
|
394
397
|
if [ ! -z "$(echo $rvm_token | awk '/\.rb$/{print}')" ] ; then # we have a specified ruby script
|
395
398
|
#if [[ ! $rvm_token =~ \.rb$ ]] ; then # we have a specified ruby script
|
data/scripts/color
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
__color() {
|
4
|
+
case "$1" in
|
5
|
+
# regular colors
|
6
|
+
black) tput setaf 0 ;;
|
7
|
+
red) tput setaf 1 ;;
|
8
|
+
green) tput setaf 2 ;;
|
9
|
+
yellow) tput setaf 3 ;;
|
10
|
+
blue) tput setaf 4 ;;
|
11
|
+
magenta) tput setaf 5 ;;
|
12
|
+
cyan) tput setaf 6 ;;
|
13
|
+
white) tput setaf 7 ;;
|
14
|
+
|
15
|
+
# emphasized (bolded) colors
|
16
|
+
eblack) tput bold ; tput setaf 0 ;;
|
17
|
+
ered) tput bold ; tput setaf 1 ;;
|
18
|
+
egreen) tput bold ; tput setaf 2 ;;
|
19
|
+
eyellow) tput bold ; tput setaf 3 ;;
|
20
|
+
eblue) tput bold ; tput setaf 4 ;;
|
21
|
+
emagenta) tput bold ; tput setaf 5 ;;
|
22
|
+
ecyan) tput bold ; tput setaf 6 ;;
|
23
|
+
ewhite) tput bold ; tput setaf 7 ;;
|
24
|
+
|
25
|
+
# underlined colors
|
26
|
+
ublack) set smul unset rmul ; tput setaf 0 ;;
|
27
|
+
ured) set smul unset rmul ; tput setaf 1 ;;
|
28
|
+
ugreen) set smul unset rmul ; tput setaf 2 ;;
|
29
|
+
uyellow) set smul unset rmul ; tput setaf 3 ;;
|
30
|
+
ublue) set smul unset rmul ; tput setaf 4 ;;
|
31
|
+
umagenta) set smul unset rmul ; tput setaf 5 ;;
|
32
|
+
ucyan) set smul unset rmul ; tput setaf 6 ;;
|
33
|
+
uwhite) set smul unset rmul ; tput setaf 7 ;;
|
34
|
+
|
35
|
+
# background colors
|
36
|
+
bblack) tput setab 0 ;;
|
37
|
+
bred) tput setab 1 ;;
|
38
|
+
bgreen) tput setab 2 ;;
|
39
|
+
byellow) tput setab 3 ;;
|
40
|
+
bblue) tput setab 4 ;;
|
41
|
+
bmagenta) tput setab 5 ;;
|
42
|
+
bcyan) tput setab 6 ;;
|
43
|
+
bwhite) tput setab 7 ;;
|
44
|
+
|
45
|
+
# Defaults
|
46
|
+
default) tput setaf 9 ;;
|
47
|
+
bdefault) tput setab 9 ;;
|
48
|
+
none) tput sgr0 ;;
|
49
|
+
*) tput sgr0 # Reset
|
50
|
+
esac
|
51
|
+
}
|
52
|
+
|
data/scripts/gems
CHANGED
@@ -4,8 +4,8 @@ __rvm_gems() {
|
|
4
4
|
unset GEM_PATH
|
5
5
|
if [ -z "$rvm_ruby_selected_flag" ] ; then __rvm_select $* ; fi
|
6
6
|
|
7
|
-
if [ ! -z "$
|
8
|
-
|
7
|
+
if [ ! -z "$rvm_clear_flag" ] ; then
|
8
|
+
__rvm_gems_clear
|
9
9
|
elif [ ! -z "$rvm_load_flag" ] ; then
|
10
10
|
__rvm_gems_load
|
11
11
|
elif [ ! -z "$rvm_dump_flag" ] ; then
|
@@ -18,8 +18,9 @@ __rvm_gems() {
|
|
18
18
|
__rvm_gems_dir
|
19
19
|
elif [ ! -z "$rvm_list_flag" ] ; then
|
20
20
|
__rvm_gems_list
|
21
|
-
elif [ ! -z "$
|
22
|
-
|
21
|
+
#elif [ ! -z "$rvm_use_flag" ] ; then
|
22
|
+
else
|
23
|
+
__rvm_gems_use
|
23
24
|
fi
|
24
25
|
}
|
25
26
|
|
@@ -53,7 +54,10 @@ __rvm_gems_select() {
|
|
53
54
|
}
|
54
55
|
|
55
56
|
__rvm_gems_use() {
|
56
|
-
mkdir -p "$rvm_ruby_gem_home"
|
57
|
+
mkdir -p "$rvm_ruby_gem_home"
|
58
|
+
GEM_HOME="$rvm_ruby_gem_home" ; export GEM_HOME
|
59
|
+
GEM_PATH="$GEM_HOME" ; export GEM_PATH
|
60
|
+
__rvm_use
|
57
61
|
}
|
58
62
|
|
59
63
|
__rvm_gems_name() {
|
@@ -71,9 +75,30 @@ __rvm_gems_list() {
|
|
71
75
|
}
|
72
76
|
|
73
77
|
__rvm_gems_clear() {
|
78
|
+
unset rvm_ruby_gem_home rvm_gem_set_name GEM_HOME GEM_PATH
|
79
|
+
__rvm_gems_select
|
74
80
|
__rvm_gems_use
|
75
|
-
|
76
|
-
|
81
|
+
}
|
82
|
+
|
83
|
+
__rvm_gems_delete () {
|
84
|
+
if [ ! -z "$rvm_gem_set_name" ] ; then
|
85
|
+
gemdir="$rvm_gem_path/$rvm_ruby_interpreter/$rvm_ruby_version%$rvm_gem_set_name"
|
86
|
+
if [ -d "$gemdir" -a ! -z "$rvm_force_flag" ] ; then
|
87
|
+
rm -rf "$gemdir"
|
88
|
+
elif [ -d "$gemdir" ] ; then
|
89
|
+
__rvm_log "warn" "Are you SURE you wish to remove the installed gems '$rvm_gem_set_name ' ($gemdir)?"
|
90
|
+
echo -n "(anything other than 'yes' will cancel) > "
|
91
|
+
read response
|
92
|
+
if [ "yes" = "$response" ] ; then
|
93
|
+
rm -rf "$gemdir"
|
94
|
+
else
|
95
|
+
__rvm_log "info" "Not doing anything, phew... close call that one eh?"
|
96
|
+
fi
|
97
|
+
else
|
98
|
+
__rvm_log "info" "$gemdir already does not exist."
|
99
|
+
fi ; unset gemdir
|
100
|
+
else
|
101
|
+
__rvm_log "error" "A gems name must be specified in order to delete a gems."
|
77
102
|
fi
|
78
103
|
}
|
79
104
|
|
@@ -132,7 +157,7 @@ __rvm_gems_load() {
|
|
132
157
|
gem="$(echo $line | awk -F';' '{print $1}')"
|
133
158
|
gem_prefix="$(echo $line | awk -F';' '{print $2}')"
|
134
159
|
gem_name="$(echo $gem | awk '{print $1}')"
|
135
|
-
gem_version="$(echo $gem | sed 's/^.*-v[=]*[ ]*//'
|
160
|
+
gem_version="$(echo $gem | awk '{print $2}' | sed 's/^.*-v[=]*[ ]*//' )"
|
136
161
|
gem_postfix="$(echo $gem | sed "s/$gem_name//" | sed "s/-v[=]*[ ]*$gem_version//")"
|
137
162
|
|
138
163
|
if [ -f "$gem" ] ; then
|
@@ -145,38 +170,47 @@ __rvm_gems_load() {
|
|
145
170
|
gem_file_name="$gem_name-$gem_version.gem"
|
146
171
|
fi
|
147
172
|
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
gem_file_name="$(basename $cache_file)"
|
159
|
-
gem_string="$(echo "$gem_file_name" | sed 's/\.gem$//')"
|
160
|
-
if [ ! -z "$(echo "$rvm_ruby_gem_list" | awk "/$gem_string/{print}")" ] ; then
|
161
|
-
#if [[ $rvm_ruby_gem_list =~ $gem_string ]] ; then
|
162
|
-
if [ ! -z "$rvm_force_flag" ] ; then
|
163
|
-
cp $cache_file $rvm_temp_path/$gem_file_name
|
164
|
-
gem="$rvm_temp_path/$gem_file_name" # install as a named local gem
|
173
|
+
if [ -z "$rvm_force_flag" -a -f "$rvm_ruby_gem_home/specifications/${gem_file_name/\.gem/.gemspec}" ] ; then
|
174
|
+
unset gem
|
175
|
+
__rvm_log "info" "$(__color "green")$gem_name $gem_version$(__color "none") is already installed, skipping. (--force to re-install)"
|
176
|
+
else
|
177
|
+
cache_file=$(/bin/ls -t "$rvm_gem_path/*/*/cache/${gem_file_name}*" 2> /dev/null | head -n1)
|
178
|
+
if [ -z "$cache_file" ] ; then
|
179
|
+
if [ -f "$gem_file_name" ] ; then
|
180
|
+
gem="$gem_file_name"
|
181
|
+
elif [ -z "$gem_version" ] ; then
|
182
|
+
gem="$gem_name"
|
165
183
|
else
|
166
|
-
|
167
|
-
|
184
|
+
gem="$gem_name -v $gem_version"
|
185
|
+
fi
|
186
|
+
else # cached
|
187
|
+
gem_file_name="$(basename $cache_file)"
|
188
|
+
gem_string="$(echo "$gem_file_name" | sed 's/\.gem$//')"
|
189
|
+
if [ ! -z "$(echo "$rvm_ruby_gem_list" | awk "/$gem_string/{print}")" ] ; then
|
190
|
+
#if [[ $rvm_ruby_gem_list =~ $gem_string ]] ; then
|
191
|
+
if [ ! -z "$rvm_force_flag" ] ; then
|
192
|
+
cp $cache_file $rvm_temp_path/$gem_file_name
|
193
|
+
gem="$rvm_temp_path/$gem_file_name" # install as a named local gem
|
194
|
+
fi
|
195
|
+
else
|
196
|
+
gem="$cache_file"
|
168
197
|
fi
|
169
|
-
else
|
170
|
-
gem="$cache_file"
|
171
198
|
fi
|
172
199
|
fi
|
173
200
|
|
174
201
|
if [ ! -z "$gem" ] ; then
|
175
202
|
# TODO: Set vars if fourth field is non-empty (means that there are conditional statements to execute in the gem install line.
|
176
203
|
if [ -z "$vars" ] ; then
|
177
|
-
GEM_HOME=
|
204
|
+
command="GEM_HOME='$rvm_ruby_gem_home' GEM_PATH='$rvm_ruby_gem_home' $gem_prefix $rvm_ruby_home/bin/gem install --no-rdoc --no-ri -q $gem $gem_postfix"
|
178
205
|
else
|
179
|
-
|
206
|
+
command="GEM_HOME='$rvm_ruby_gem_home' GEM_PATH='$rvm_ruby_gem_home' $gem_prefix $rvm_ruby_home/bin/gem install --no-rdoc --no-ri -q $gem $gem_postfix"
|
207
|
+
fi
|
208
|
+
eval $command > /dev/null 2>&1
|
209
|
+
result=$?
|
210
|
+
if [[ $result -eq 0 ]] ; then
|
211
|
+
__rvm_log "info" "$(__color "green")$gem_name $gem_version$(__color "none") installed. (--force to re-install)"
|
212
|
+
else
|
213
|
+
__rvm_log "error" "$(__color "red")$gem_name $gem_version$(__color "none") failed to install. (--force to re-install)"
|
180
214
|
fi
|
181
215
|
fi
|
182
216
|
unset gem gem_prefix gem_name gem_version gem_file_name gem_postfix cache_file gem_file_name gem_string
|
@@ -186,26 +220,3 @@ __rvm_gems_load() {
|
|
186
220
|
fi
|
187
221
|
}
|
188
222
|
|
189
|
-
__rvm_gems_delete () {
|
190
|
-
if [ ! -z "$rvm_gem_set_name" ] ; then
|
191
|
-
gemdir="$rvm_gem_path/$rvm_ruby_interpreter/$rvm_ruby_version%$rvm_gem_set_name"
|
192
|
-
if [ -d "$gemdir" -a ! -z "$rvm_force_flag" ] ; then
|
193
|
-
rm -rf "$gemdir"
|
194
|
-
elif [ -d "$gemdir" ] ; then
|
195
|
-
__rvm_log "warn" "Are you SURE you wish to remove the installed gems '$rvm_gem_set_name ' ($gemdir)?"
|
196
|
-
echo -n "(anything other than 'yes' will cancel) > "
|
197
|
-
read response
|
198
|
-
if [ "yes" = "$response" ] ; then
|
199
|
-
rm -rf "$gemdir"
|
200
|
-
else
|
201
|
-
__rvm_log "info" "Not doing anything, phew... close call that one eh?"
|
202
|
-
fi
|
203
|
-
else
|
204
|
-
__rvm_log "info" "$gemdir already does not exist."
|
205
|
-
fi ; unset gemdir
|
206
|
-
else
|
207
|
-
__rvm_log "error" "A gems name must be specified in order to delete a gems."
|
208
|
-
fi
|
209
|
-
}
|
210
|
-
|
211
|
-
|
data/scripts/install
CHANGED
@@ -37,7 +37,7 @@ if [ -z "$rvm_loaded_flag" ] ; then
|
|
37
37
|
if [ ! -e ~/$rcfile ] ; then touch ~/$rcfile ; fi
|
38
38
|
if [ -z "$(awk '/\.rvm\/scripts\/rvm/' ~/$rcfile)" ] ; then
|
39
39
|
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/$rcfile."
|
40
|
-
echo -e "\n# rvm
|
40
|
+
echo -e "\n# rvm-install added line:\nif [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi\n" >> ~/$rcfile
|
41
41
|
fi
|
42
42
|
done
|
43
43
|
fi
|
@@ -53,7 +53,7 @@ for file in ~/.bash_profile ~/.bashrc ~/.zshrc ; do
|
|
53
53
|
|
54
54
|
grep 'rvm\/bin\/rvm' $actual_file > /dev/null
|
55
55
|
if [ $? -eq 0 ] ; then
|
56
|
-
sed -i.orig 's/
|
56
|
+
sed -i.orig 's#rvm/bin/rvm #rvm/scripts/rvm #g' $actual_file
|
57
57
|
rm -f $actual_file.orig
|
58
58
|
fi
|
59
59
|
|
data/scripts/rvm
CHANGED
@@ -9,6 +9,7 @@
|
|
9
9
|
if [ -s ~/.rvmrc ] ; then source ~/.rvmrc ; fi
|
10
10
|
eval rvm_path="${rvm_path:-~/.rvm}"
|
11
11
|
|
12
|
+
source $rvm_path/scripts/color
|
12
13
|
source $rvm_path/scripts/utility
|
13
14
|
source $rvm_path/scripts/selector
|
14
15
|
source $rvm_path/scripts/ruby-installer # TODO: Script not function.
|
data/scripts/rvm-install
CHANGED
@@ -37,7 +37,7 @@ if [ -z "$rvm_loaded_flag" ] ; then
|
|
37
37
|
if [ ! -e ~/$rcfile ] ; then touch ~/$rcfile ; fi
|
38
38
|
if [ -z "$(awk '/\.rvm\/scripts\/rvm/' ~/$rcfile)" ] ; then
|
39
39
|
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/$rcfile."
|
40
|
-
echo -e "\n# rvm
|
40
|
+
echo -e "\n# rvm-install added line:\nif [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi\n" >> ~/$rcfile
|
41
41
|
fi
|
42
42
|
done
|
43
43
|
fi
|
@@ -53,7 +53,7 @@ for file in ~/.bash_profile ~/.bashrc ~/.zshrc ; do
|
|
53
53
|
|
54
54
|
grep 'rvm\/bin\/rvm' $actual_file > /dev/null
|
55
55
|
if [ $? -eq 0 ] ; then
|
56
|
-
sed -i.orig 's/
|
56
|
+
sed -i.orig 's#rvm/bin/rvm #rvm/scripts/rvm #g' $actual_file
|
57
57
|
rm -f $actual_file.orig
|
58
58
|
fi
|
59
59
|
|
data/scripts/selector
CHANGED
@@ -76,7 +76,9 @@ function __rvm_select {
|
|
76
76
|
ruby-enterprise|ree)
|
77
77
|
rvm_ruby_interpreter=ree
|
78
78
|
rvm_ruby_version=${rvm_ruby_version:-"$(__rvm_db "ree_version")"}
|
79
|
-
|
79
|
+
if [ "$rvm_ruby_version" != "head" ] ; then
|
80
|
+
rvm_ruby_patch_level="${rvm_ruby_patch_level:-$(__rvm_db "${rvm_ruby_interpreter}_${rvm_ruby_version}_patch_level")}"
|
81
|
+
fi
|
80
82
|
rvm_ruby_package_name="ree-$rvm_ruby_version-$rvm_ruby_patch_level"
|
81
83
|
rvm_ruby_package_file="ruby-enterprise-$rvm_ruby_version-$rvm_ruby_patch_level"
|
82
84
|
if [ -z "$(echo $rvm_ruby_version | awk '/^1\.8/')" ] ; then
|
@@ -87,16 +89,13 @@ function __rvm_select {
|
|
87
89
|
ruby)
|
88
90
|
if [ ! -z "$rvm_ruby_tag" ] ; then
|
89
91
|
rvm_ruby_version=$(echo $rvm_ruby_tag | sed 's/^v//' | sed 's/\///' | awk -F'_' '{print 1 "." $2 "." $3 }')
|
90
|
-
rvm_ruby_patch_level=$rvm_ruby_tag # $(echo $rvm_ruby_tag | sed 's/^v//' | sed 's/\///' | awk -F'_' '{print $4 }')
|
91
|
-
|
92
|
-
if [ -z "$rvm_ruby_version" ] ; then
|
93
|
-
rvm_ruby_version=$(__rvm_db "ruby_version") # Default verison is 1.8.6
|
94
|
-
fi
|
95
|
-
rvm_ruby_patch_level=${rvm_ruby_patch_level:-$(__rvm_db "ruby_${rvm_ruby_version}_patch_level")} # Default verison is 1.8.6
|
96
|
-
if [ -z "rvm_ruby_patch_level" ] ; then unset rvm_ruby_patch_level ; fi
|
97
|
-
if [ -z "rvm_ruby_version" ] ; then
|
98
|
-
__rvm_log "fail" "Unknown ruby version: $rvm_ruby_version"
|
92
|
+
# rvm_ruby_patch_level=$rvm_ruby_tag # $(echo $rvm_ruby_tag | sed 's/^v//' | sed 's/\///' | awk -F'_' '{print $4 }')
|
93
|
+
if [ -z "$rvm_ruby_patch_level" ] ; then rvm_ruby_patch_level=$rvm_Ruby_tag ; fi
|
99
94
|
fi
|
95
|
+
if [ -z "$rvm_ruby_version" ] ; then rvm_ruby_version=$(__rvm_db "ruby_version") ; fi
|
96
|
+
if [ -z "$rvm_ruby_patch_level" ] ; then rvm_ruby_patch_level="$(__rvm_db "ruby_${rvm_ruby_version/ /}_patch_level")" ; fi
|
97
|
+
if [ -z "$rvm_ruby_patch_level" ] ; then unset rvm_ruby_patch_level ; fi
|
98
|
+
if [ -z "$rvm_ruby_version" ] ; then __rvm_log "fail" "Unknown ruby version: $rvm_ruby_version" ; fi
|
100
99
|
;;
|
101
100
|
|
102
101
|
default|system|current|user)
|
@@ -257,12 +256,23 @@ function __rvm_ruby_string {
|
|
257
256
|
|
258
257
|
rvm_ruby_interpreter=$(echo $ruby_string | awk -F'-' '{print $1}')
|
259
258
|
rvm_ruby_version=$(echo $ruby_string | awk -F'-' '{print $2}')
|
259
|
+
if [ "$rvm_ruby_version" != "head" ] ; then
|
260
|
+
patch_level=$(echo $ruby_string | awk -F'-' '{print $3}')
|
261
|
+
if [ ! -z "$patch_level" ] ; then rvm_ruby_patch_level="$patch_level" ; fi
|
262
|
+
else
|
263
|
+
rvm_ruby_patch_level="head"
|
264
|
+
fi
|
265
|
+
|
260
266
|
if [ ! -z "$(echo $rvm_ruby_interpreter | awk '/^1\.[8-9]/')" ] ; then
|
261
267
|
rvm_ruby_patch_level=$rvm_ruby_version
|
262
268
|
rvm_ruby_version=$rvm_ruby_interpreter
|
263
269
|
rvm_ruby_interpreter="ruby"
|
264
270
|
if [ -z "$rvm_ruby_patch_level" ] ; then
|
265
|
-
|
271
|
+
if [ "$rvm_ruby_version" != "head" ] ; then
|
272
|
+
rvm_ruby_patch_level="$(__rvm_db "${rvm_ruby_interpreter}_${rvm_ruby_version}_patch_level")"
|
273
|
+
else
|
274
|
+
rvm_ruby_patch_level="head"
|
275
|
+
fi
|
266
276
|
fi
|
267
277
|
elif [ ! -z "$(echo $rvm_ruby_interpreter | awk '/^1\.[3-4]/')" ] ; then
|
268
278
|
rvm_ruby_version=$rvm_ruby_interpreter
|
data/scripts/update
CHANGED
@@ -37,7 +37,7 @@ if [ -z "$rvm_loaded_flag" ] ; then
|
|
37
37
|
if [ ! -e ~/$rcfile ] ; then touch ~/$rcfile ; fi
|
38
38
|
if [ -z "$(awk '/\.rvm\/scripts\/rvm/' ~/$rcfile)" ] ; then
|
39
39
|
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/$rcfile."
|
40
|
-
echo -e "\n# rvm
|
40
|
+
echo -e "\n# rvm-install added line:\nif [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi\n" >> ~/$rcfile
|
41
41
|
fi
|
42
42
|
done
|
43
43
|
fi
|
@@ -53,7 +53,7 @@ for file in ~/.bash_profile ~/.bashrc ~/.zshrc ; do
|
|
53
53
|
|
54
54
|
grep 'rvm\/bin\/rvm' $actual_file > /dev/null
|
55
55
|
if [ $? -eq 0 ] ; then
|
56
|
-
sed -i.orig 's/
|
56
|
+
sed -i.orig 's#rvm/bin/rvm #rvm/scripts/rvm #g' $actual_file
|
57
57
|
rm -f $actual_file.orig
|
58
58
|
fi
|
59
59
|
|
data/scripts/utility
CHANGED
@@ -53,7 +53,6 @@ function __rvm_debug {
|
|
53
53
|
if [ -f $rvm_path/bin/rvm ] ; then
|
54
54
|
__rvm_log "error" "rvm script in bin! \n$(ls -laht $rvm_path/bin/rvm)"
|
55
55
|
fi
|
56
|
-
|
57
56
|
}
|
58
57
|
|
59
58
|
# Logging functions based on level
|
@@ -87,7 +86,7 @@ function __rvm_clean_path {
|
|
87
86
|
export PATH
|
88
87
|
}
|
89
88
|
|
90
|
-
function
|
89
|
+
function __rvm_remove_rvm_from_path {
|
91
90
|
PATH=$(echo $PATH | tr -s ':' '\n' | grep -v "\.rvm" | tr -s '\n' ':' | sed 's/:$//')
|
92
91
|
export PATH
|
93
92
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rvm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.60
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wayne E. Seguin
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
12
|
+
date: 2009-10-18 00:00:00 -04:00
|
13
13
|
default_executable: rvm-install
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -33,6 +33,7 @@ files:
|
|
33
33
|
- rvm.gemspec
|
34
34
|
- scripts/aliases
|
35
35
|
- scripts/cli
|
36
|
+
- scripts/color
|
36
37
|
- scripts/completion
|
37
38
|
- scripts/functions
|
38
39
|
- scripts/gems
|