rvm 0.0.60 → 0.0.61
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/lib/VERSION.yml +1 -1
- data/rvm.gemspec +2 -2
- data/scripts/cli +15 -11
- data/scripts/gems +25 -20
- data/scripts/ruby-installer +2 -8
- data/scripts/selector +5 -5
- data/scripts/utility +79 -18
- metadata +2 -2
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.61"
|
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-20}
|
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}
|
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.19"
|
9
9
|
}
|
10
10
|
|
11
11
|
function __rvm_version { __rvm_meta ; echo "rvm $rvm_meta_version ($rvm_meta_updated) [$rvm_meta_website]" ; }
|
@@ -107,7 +107,7 @@ function __rvm_parse_args {
|
|
107
107
|
while [ $# -gt 0 ] ; do
|
108
108
|
rvm_token="$1" ; shift
|
109
109
|
case "$rvm_token" in
|
110
|
-
install|uninstall|path|info|setup|version|srcdir|list|reset|debug|reload|implode|readline|iconv|
|
110
|
+
install|uninstall|path|info|setup|version|srcdir|list|reset|debug|reload|implode|readline|gemsync|update|iconv|openssl|ncurses|zlib|readline)
|
111
111
|
rvm_action=$rvm_token
|
112
112
|
;;
|
113
113
|
|
@@ -135,7 +135,7 @@ function __rvm_parse_args {
|
|
135
135
|
rvm_ruby_interpreter="$rvm_token"
|
136
136
|
rvm_action="${rvm_action:-use}"
|
137
137
|
#if [ ! -z "$(echo $1 | awk '/^[0-9]/')" ] ; then
|
138
|
-
if [[ $1 =~ ^[0-9] ]] ; then
|
138
|
+
if [[ ! -z "$1" ]] && [[ "$1" =~ ^[0-9] ]] ; then
|
139
139
|
rvm_ruby_version=$1 ; shift
|
140
140
|
fi
|
141
141
|
;;
|
@@ -181,7 +181,7 @@ function __rvm_parse_args {
|
|
181
181
|
|
182
182
|
do|ruby|rake|gem|rubydo|rakedo|gemdo)
|
183
183
|
if [ "do" = "$rvm_action" ] ; then rvm_action="ruby" ; fi
|
184
|
-
rvm_action=$(echo $rvm_token | sed 's
|
184
|
+
rvm_action=$(echo $rvm_token | sed 's#do##g')
|
185
185
|
|
186
186
|
if [ "rake" = "$rvm_action" -o "$rvm_action" = "gem" -o "$rvm_action" = "ruby" ] ; then
|
187
187
|
if [ -z "$1" ] ; then
|
@@ -356,11 +356,11 @@ function __rvm_parse_args {
|
|
356
356
|
tests|specs) rvm_action="tests" ;;
|
357
357
|
|
358
358
|
--trace)
|
359
|
-
eval "rvm_$(echo $rvm_token | sed 's
|
359
|
+
eval "rvm_$(echo $rvm_token | sed 's#-##g')_flag=1"
|
360
360
|
set -x
|
361
361
|
;;
|
362
362
|
--self|--gem|--rubygems|--reconfigure|--default|--debug|--force|--all|--dump|--summary|--jit|--latest|--yaml|--json|--archive|--shebang|--env|--path|--tail|--delete)
|
363
|
-
eval "rvm_$(echo $rvm_token | sed 's
|
363
|
+
eval "rvm_$(echo $rvm_token | sed 's#-##g')_flag=1"
|
364
364
|
;;
|
365
365
|
|
366
366
|
reboot|flush|asdf|damnit|wtf|argh|work|workdamnit|BOOM|boom|wth)
|
@@ -376,10 +376,10 @@ function __rvm_parse_args {
|
|
376
376
|
if [ ! -z "$rvm_token" ] ; then
|
377
377
|
if [ "gems" = "$rvm_action" ] ; then
|
378
378
|
if [ ! -z "$(echo $rvm_token | awk '/\.gems$/')" ] ; then
|
379
|
-
rvm_file_name="$(echo $rvm_token | sed 's
|
379
|
+
rvm_file_name="$(echo $rvm_token | sed 's#\.gems##g').gems"
|
380
380
|
# elif [ ! -z "$(echo $rvm_token | awk '/\.gems$/')" ] ; then
|
381
381
|
else
|
382
|
-
rvm_gem_set_name="$(echo $rvm_token | sed 's
|
382
|
+
rvm_gem_set_name="$(echo $rvm_token | sed 's#\.gems##g')"
|
383
383
|
rvm_file_name="$rvm_gem_set_name.gems"
|
384
384
|
fi
|
385
385
|
elif [ ! -z "$(echo $rvm_token | awk '/,/')" ] ; then
|
@@ -391,11 +391,11 @@ function __rvm_parse_args {
|
|
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
393
|
#elif [ ! -z "$(echo $rvm_token | awk '/^[0-9].[0-9]/')" ] ; then
|
394
|
-
elif [[ $rvm_token =~ ^[0-9].[0-9] ]] ; then
|
394
|
+
elif [[ ! -z "$rvm_token" ]] && [[ "$rvm_token" =~ ^[0-9].[0-9] ]] ; then
|
395
395
|
rvm_ruby_string="$rvm_token"
|
396
396
|
else
|
397
397
|
if [ ! -z "$(echo $rvm_token | awk '/\.rb$/{print}')" ] ; then # we have a specified ruby script
|
398
|
-
#if [[ ! $rvm_token =~ \.rb$ ]] ; then # we have a specified ruby script
|
398
|
+
#if [[ ! -z "$rvm_token" ]] && [[ " ! $rvm_token =~ \.rb$ ]] ; then # we have a specified ruby script
|
399
399
|
rvm_ruby_args=$rvm_token
|
400
400
|
rvm_ruby_file=$rvm_token
|
401
401
|
if [ -z "$rvm_action" ] ; then
|
@@ -449,7 +449,6 @@ function rvm {
|
|
449
449
|
implode) __rvm_implode ; result=$? ;;
|
450
450
|
update) __rvm_update ; result=$? ;;
|
451
451
|
readline) __rvm_readline_install ; result=$? ;;
|
452
|
-
iconv) __rvm_iconv_install ; result=$? ;;
|
453
452
|
reboot) __rvm_reboot ; result=$? ;;
|
454
453
|
usage|help) __rvm_usage ; result=$? ;;
|
455
454
|
benchmark) __rvm_benchmark ; result=$? ;;
|
@@ -457,6 +456,11 @@ function rvm {
|
|
457
456
|
inspect) __rvm_inspect ; result=$? ;;
|
458
457
|
gems) __rvm_gems ; result=$? ;;
|
459
458
|
|
459
|
+
iconv|openssl|ncurses|zlib|readline)
|
460
|
+
__rvm_${rvm_action}_install
|
461
|
+
result=$?
|
462
|
+
;;
|
463
|
+
|
460
464
|
install|uninstall|remove)
|
461
465
|
__rvm_manage_rubies
|
462
466
|
result=$?
|
data/scripts/gems
CHANGED
@@ -34,7 +34,7 @@ __rvm_gems_select() {
|
|
34
34
|
rvm_gem_set_name=$(echo $rvm_ruby_gem_home | xargs basename | awk -F'%' '{print $2}')
|
35
35
|
fi
|
36
36
|
|
37
|
-
if [ ! -z "$rvm_gem_set_name" ] && [[ ! "$rvm_gem_set_name" =~ ^\d\.\d ]] ; then
|
37
|
+
if [[ ! -z "$rvm_gem_set_name" ]] && [[ ! "$rvm_gem_set_name" =~ ^\d\.\d ]] ; then
|
38
38
|
rvm_ruby_gem_home="$rvm_gem_path/$rvm_ruby_interpreter/$rvm_ruby_version%$rvm_gem_set_name"
|
39
39
|
else
|
40
40
|
if [ ! -z "$rvm_ruby_interpreter" -a ! -z "$rvm_ruby_version" -a "$rvm_ruby_interpreter" != "system" ] ; then
|
@@ -119,10 +119,10 @@ __rvm_gems_dump() {
|
|
119
119
|
touch $rvm_file_name
|
120
120
|
echo "# $rvm_file_name generated gem dump file. Note that any env variable settings will be missing. Append these after using a ';' field separator" > $rvm_file_name
|
121
121
|
|
122
|
-
for gem in $(gem list | sed 's
|
122
|
+
for gem in $(gem list | sed 's#[\(|\)]##g' | sed 's#, #,#g' | tr ' ' ';') ; do
|
123
123
|
name="$(echo $gem | awk -F';' '{print $1}')"
|
124
124
|
if [ -z "$rvm_latest_flag" ] ; then
|
125
|
-
versions="$(echo $gem | awk -F';' '{print $2}' | sed 's
|
125
|
+
versions="$(echo $gem | awk -F';' '{print $2}' | sed 's#,# #g')"
|
126
126
|
for version in $versions ; do
|
127
127
|
echo "$name -v$version" >> $rvm_file_name
|
128
128
|
done ; unset version versions
|
@@ -150,19 +150,26 @@ __rvm_gems_load() {
|
|
150
150
|
|
151
151
|
if [ -f "$rvm_file_name" ] ; then
|
152
152
|
echo "Loading $rvm_file_name file..."
|
153
|
-
rvm_ruby_gem_list=$(/bin/ls $rvm_ruby_gem_home/specifications/ 2> /dev/null | sed 's
|
153
|
+
rvm_ruby_gem_list=$(/bin/ls $rvm_ruby_gem_home/specifications/ 2> /dev/null | sed 's#\.gemspec$##' 2> /dev/null)
|
154
154
|
while read line
|
155
155
|
do # Keep this on 2nd line :( bash fail.
|
156
156
|
# TODO: Switch to a different field separator than ; to allow for evals
|
157
157
|
gem="$(echo $line | awk -F';' '{print $1}')"
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
158
|
+
if [[ ! -z "$gem" ]] && [[ "$gem" =~ \.gem$ ]] ; then
|
159
|
+
gem_prefix="$(echo $line | awk -F';' '{print $2}')"
|
160
|
+
gem_name="$(echo $gem | awk '{print $1}')"
|
161
|
+
gem_version="$(echo $gem | awk '{print $2}' | sed 's#^.*-v[=]*[ ]*##' )"
|
162
|
+
gem_postfix="$(echo $gem | sed "s/$gem_name//" | sed "s#-v[=]*[ ]*$gem_version##")"
|
163
|
+
else
|
164
|
+
gem_prefix="$(echo $line | awk -F';' '{print $2}')"
|
165
|
+
gem_name="$(echo $gem | awk '{print $1}')"
|
166
|
+
gem_version="$(echo $gem | awk '{print $2}' | sed 's#^.*-v[=]*[ ]*##' )"
|
167
|
+
gem_postfix="$(echo $gem | sed "s/$gem_name//" | sed "s#-v[=]*[ ]*$gem_version##")"
|
168
|
+
fi
|
162
169
|
|
163
170
|
if [ -f "$gem" ] ; then
|
164
|
-
gem_file_name="$
|
165
|
-
elif [[ "$gem" =~ ".gem$" ]] ; then
|
171
|
+
gem_file_name="$(basename $gem)"
|
172
|
+
elif [[ ! -z "$gem" ]] && [[ "$gem" =~ ".gem$" ]] ; then
|
166
173
|
gem_file_name="${gem}"
|
167
174
|
elif [ -z "$gem_version" ] ; then # no version
|
168
175
|
gem_file_name="${gem_name}*.gem"
|
@@ -172,7 +179,7 @@ __rvm_gems_load() {
|
|
172
179
|
|
173
180
|
if [ -z "$rvm_force_flag" -a -f "$rvm_ruby_gem_home/specifications/${gem_file_name/\.gem/.gemspec}" ] ; then
|
174
181
|
unset gem
|
175
|
-
__rvm_log "
|
182
|
+
__rvm_log "warn" "Skipping $(__color "yellow")$gem_name $gem_version$(__color "none") (--force to re-install)"
|
176
183
|
else
|
177
184
|
cache_file=$(/bin/ls -t "$rvm_gem_path/*/*/cache/${gem_file_name}*" 2> /dev/null | head -n1)
|
178
185
|
if [ -z "$cache_file" ] ; then
|
@@ -185,9 +192,9 @@ __rvm_gems_load() {
|
|
185
192
|
fi
|
186
193
|
else # cached
|
187
194
|
gem_file_name="$(basename $cache_file)"
|
188
|
-
gem_string="$(echo "$gem_file_name" | sed 's
|
195
|
+
gem_string="$(echo "$gem_file_name" | sed 's#\.gem$##')"
|
189
196
|
if [ ! -z "$(echo "$rvm_ruby_gem_list" | awk "/$gem_string/{print}")" ] ; then
|
190
|
-
#if [[ $rvm_ruby_gem_list =~ $gem_string ]] ; then
|
197
|
+
#if [[ ! -z "$rvm_ruby_gem_list" ]] && [[ "$rvm_ruby_gem_list" =~ $gem_string ]] ; then
|
191
198
|
if [ ! -z "$rvm_force_flag" ] ; then
|
192
199
|
cp $cache_file $rvm_temp_path/$gem_file_name
|
193
200
|
gem="$rvm_temp_path/$gem_file_name" # install as a named local gem
|
@@ -200,17 +207,15 @@ __rvm_gems_load() {
|
|
200
207
|
|
201
208
|
if [ ! -z "$gem" ] ; then
|
202
209
|
# TODO: Set vars if fourth field is non-empty (means that there are conditional statements to execute in the gem install line.
|
203
|
-
|
204
|
-
|
205
|
-
|
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
|
210
|
+
__rvm_make_flags
|
211
|
+
__rvm_log "info" "Installing $gem_name $gem_version..."
|
212
|
+
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 $vars"
|
208
213
|
eval $command > /dev/null 2>&1
|
209
214
|
result=$?
|
210
215
|
if [[ $result -eq 0 ]] ; then
|
211
|
-
__rvm_log "info" "$(__color "green")$gem_name $gem_version$(__color "none") installed.
|
216
|
+
__rvm_log "info" "$(__color "green")$gem_name $gem_version$(__color "none") installed."
|
212
217
|
else
|
213
|
-
__rvm_log "error" "$(__color "red")$gem_name $gem_version$(__color "none") failed to install.
|
218
|
+
__rvm_log "error" "$(__color "red")$gem_name $gem_version$(__color "none") failed to install."
|
214
219
|
fi
|
215
220
|
fi
|
216
221
|
unset gem gem_prefix gem_name gem_version gem_file_name gem_postfix cache_file gem_file_name gem_string
|
data/scripts/ruby-installer
CHANGED
@@ -80,12 +80,6 @@ function __rvm_install_source {
|
|
80
80
|
if [ -s ./Makefile -a -z "$rvm_reconfigure_flag" ] ; then
|
81
81
|
__rvm_log "debug" "Skipping configure step, Makefile exists so configure must have already been run."
|
82
82
|
elif [ -s ./configure ] ; then
|
83
|
-
if [ -d "$rvm_path/usr/include/readline/" ] ; then
|
84
|
-
configure_parameters="$configure_parameters --with-readline-dir=$rvm_path/usr/include/readline/"
|
85
|
-
fi
|
86
|
-
if [ -d "$rvm_path/usr/include/iconv/" ] ; then
|
87
|
-
configure_parameters="$configure_parameters --with-iconv-dir=$rvm_path/usr/include/iconv/"
|
88
|
-
fi
|
89
83
|
__rvm_run "configure" "./configure --prefix=$rvm_ruby_home $rvm_ruby_configure $configure_parameters" "Configuring $rvm_ruby_package_name using $rvm_ruby_configure, this may take a while depending on your cpu(s)..."
|
90
84
|
if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
|
91
85
|
unset configure_parameters
|
@@ -119,7 +113,7 @@ function __rvm_install_ruby {
|
|
119
113
|
|
120
114
|
if [ -z "$rvm_ruby_selected_flag" ] ; then __rvm_select $* ; fi
|
121
115
|
if [ ! -z "$RUBYOPT" ] ; then ruby_options="$RUBYOPT" ; unset RUBYOPT ; fi
|
122
|
-
|
116
|
+
__rvm_make_flags
|
123
117
|
|
124
118
|
case "$rvm_ruby_interpreter" in
|
125
119
|
macruby)
|
@@ -156,7 +150,7 @@ function __rvm_install_ruby {
|
|
156
150
|
mkdir -p "$rvm_ruby_log_path"
|
157
151
|
mkdir -p "${rvm_ruby_home}/lib/ruby/gems/1.8/gems"
|
158
152
|
if [ ! -z "$rvm_ruby_configure" ] ; then rvm_ruby_configure="-c $rvm_ruby_configure"; fi
|
159
|
-
__rvm_run "install" "./installer -a $rvm_path/$rvm_ruby_interpreter-$rvm_ruby_version-$rvm_ruby_patch_level --dont-install-useful-gems
|
153
|
+
__rvm_run "install" "./installer -a $rvm_path/$rvm_ruby_interpreter-$rvm_ruby_version-$rvm_ruby_patch_level --dont-install-useful-gems $rvm_ruby_configure" "Installing $rvm_ruby_string, this may take a while, depending on your cpu(s)..." # --no-tcmalloc
|
160
154
|
if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
|
161
155
|
chmod +x $rvm_ruby_home/bin/*
|
162
156
|
|
data/scripts/selector
CHANGED
@@ -88,8 +88,8 @@ function __rvm_select {
|
|
88
88
|
|
89
89
|
ruby)
|
90
90
|
if [ ! -z "$rvm_ruby_tag" ] ; then
|
91
|
-
rvm_ruby_version=$(echo $rvm_ruby_tag | sed 's
|
92
|
-
# rvm_ruby_patch_level=$rvm_ruby_tag # $(echo $rvm_ruby_tag | sed 's
|
91
|
+
rvm_ruby_version=$(echo $rvm_ruby_tag | sed 's#^v##' | sed 's#/##' | awk -F'_' '{print 1 "." $2 "." $3 }')
|
92
|
+
# rvm_ruby_patch_level=$rvm_ruby_tag # $(echo $rvm_ruby_tag | sed 's#^v##' | sed 's#/##' | awk -F'_' '{print $4 }')
|
93
93
|
if [ -z "$rvm_ruby_patch_level" ] ; then rvm_ruby_patch_level=$rvm_Ruby_tag ; fi
|
94
94
|
fi
|
95
95
|
if [ -z "$rvm_ruby_version" ] ; then rvm_ruby_version=$(__rvm_db "ruby_version") ; fi
|
@@ -133,7 +133,7 @@ function __rvm_select {
|
|
133
133
|
if [ ! -z "$(echo $rvm_ruby_patch_level | awk '/^[0-9]/')" ] ; then
|
134
134
|
rvm_ruby_patch_level="p$rvm_ruby_patch_level"
|
135
135
|
fi
|
136
|
-
rvm_ruby_patch_level="$(echo $rvm_ruby_patch_level | sed 's
|
136
|
+
rvm_ruby_patch_level="$(echo $rvm_ruby_patch_level | sed 's#^pp#p#')" # sanity check, thanks sfpyra
|
137
137
|
fi
|
138
138
|
rvm_ruby_package_name="${rvm_ruby_package_name:-"$rvm_ruby_interpreter-$rvm_ruby_version-$rvm_ruby_patch_level"}"
|
139
139
|
rvm_ruby_home="${rvm_ruby_home:-"$rvm_path/$rvm_ruby_interpreter-$rvm_ruby_version-$rvm_ruby_patch_level"}"
|
@@ -212,7 +212,7 @@ function __rvm_use {
|
|
212
212
|
rm -f $rvm_path/default
|
213
213
|
rm -f $rvm_path/bin/default*
|
214
214
|
else
|
215
|
-
RUBY_VERSION="$($MY_RUBY_HOME/bin/ruby -v | sed 's
|
215
|
+
RUBY_VERSION="$($MY_RUBY_HOME/bin/ruby -v | sed 's#^\(.*\) (.*$#\1#')"
|
216
216
|
export GEM_HOME GEM_PATH MY_RUBY_HOME RUBY_VERSION
|
217
217
|
|
218
218
|
echo "PATH=$MY_RUBY_HOME/bin:$GEM_HOME/bin:$rvm_path/bin:\$PATH ; export PATH" > $rvm_path/default
|
@@ -246,7 +246,7 @@ function __rvm_ruby_string {
|
|
246
246
|
if [ "system" = "$rvm_ruby_interpreter" ] ; then
|
247
247
|
rvm_ruby_string="system"
|
248
248
|
elif [ ! -z "$rvm_ruby_string" ] ; then
|
249
|
-
ruby_string=$(echo "$rvm_ruby_string" | sed 's
|
249
|
+
ruby_string=$(echo "$rvm_ruby_string" | sed 's#ruby-enterprise#ree#g') # dash-antics
|
250
250
|
if [ ! -z "$(echo "$rvm_ruby_string" | awk -F'%' '{print $2}')" ] ; then
|
251
251
|
rvm_gem_set_name=$(echo "$rvm_ruby_string" | awk -F'%' '{print $2}')
|
252
252
|
fi
|
data/scripts/utility
CHANGED
@@ -82,12 +82,12 @@ __rvm_push() {
|
|
82
82
|
}
|
83
83
|
|
84
84
|
function __rvm_clean_path {
|
85
|
-
PATH=$(echo $PATH | tr -s ':' '\n' | awk '!($0 in a){a[$0];print}' | tr -s '\n' ':' | sed 's
|
85
|
+
PATH=$(echo $PATH | tr -s ':' '\n' | awk '!($0 in a){a[$0];print}' | tr -s '\n' ':' | sed 's#:$##')
|
86
86
|
export PATH
|
87
87
|
}
|
88
88
|
|
89
89
|
function __rvm_remove_rvm_from_path {
|
90
|
-
PATH=$(echo $PATH | tr -s ':' '\n' | grep -v "\.rvm" | tr -s '\n' ':' | sed 's
|
90
|
+
PATH=$(echo $PATH | tr -s ':' '\n' | grep -v "\.rvm" | tr -s '\n' ':' | sed 's#:$##')
|
91
91
|
export PATH
|
92
92
|
}
|
93
93
|
|
@@ -352,7 +352,7 @@ function __rvm_db {
|
|
352
352
|
else
|
353
353
|
value="$*"
|
354
354
|
if [ "unset" = "$value" -o "delete" = "$value" ] ; then
|
355
|
-
sed -i.tmp "s
|
355
|
+
sed -i.tmp "s#^$key=.*$\##" $rvm_hash_file
|
356
356
|
else
|
357
357
|
if [ -z "$value" ] ; then # get
|
358
358
|
grep "^$key=" $rvm_hash_file | head -n 1 | awk -F'=' '{print $2}'
|
@@ -360,7 +360,7 @@ function __rvm_db {
|
|
360
360
|
if [ -z "$(grep "^$key=" $rvm_hash_file)" ] ; then # append
|
361
361
|
echo "$key=$value" >> $rvm_hash_file
|
362
362
|
else # overwrite
|
363
|
-
sed -i.tmp "s
|
363
|
+
sed -i.tmp "s#^$key=.*$\#$key=$value#" $rvm_hash_file
|
364
364
|
fi
|
365
365
|
fi
|
366
366
|
fi
|
@@ -369,7 +369,7 @@ function __rvm_db {
|
|
369
369
|
|
370
370
|
function __rvm_list {
|
371
371
|
if [ "$rvm_all_flag" ] ; then
|
372
|
-
svn list http://svn.ruby-lang.org/repos/ruby/tags/ | grep 'v1_[8|9]' | sed 's
|
372
|
+
svn list http://svn.ruby-lang.org/repos/ruby/tags/ | grep 'v1_[8|9]' | sed 's#^v1_##' | sed 's#/$##' | awk -F'_' '{print "1."$1"."$2 " -l "$3}' | sed 's#p$##'
|
373
373
|
echo -e "jruby 1.2.0\njruby 1.3.0\njruby (1.3.1, the default)\njruby 1.4.1\njruby --head"
|
374
374
|
echo -e "rbx head (rubinius head, the default)\nrbx head --jit"
|
375
375
|
echo -e "ree 1.8.6 --head\nree (1.8.7, the default)"
|
@@ -469,8 +469,6 @@ function __rvm_initialize {
|
|
469
469
|
rvm_ruby_load_path="."
|
470
470
|
rvm_ruby_require=""
|
471
471
|
|
472
|
-
if [ "Darwin" = "$(uname)" ] ; then rvm_archflags="${rvm_archflags:-'-arch i386 -arch x86_64'}" ; fi
|
473
|
-
|
474
472
|
__rvm_clean_path
|
475
473
|
rvm_result=$(echo $PATH | grep 'rvm\/bin:')
|
476
474
|
if [ -z $rvm_result ] ; then
|
@@ -545,14 +543,14 @@ __rvm_reload() {
|
|
545
543
|
__rvm_ruby_do() {
|
546
544
|
__rvm_select
|
547
545
|
__rvm_use
|
548
|
-
binary="$(echo $rvm_action | sed 's
|
546
|
+
binary="$(echo $rvm_action | sed 's#do$##')"
|
549
547
|
if [ -x $rvm_ruby_home/bin/$binary ] ; then
|
550
548
|
load_path="$rvm_ruby_home/bin:$rvm_ruby_load_path"
|
551
549
|
if [ "ruby" = "$binary" ] ; then
|
552
550
|
if [ -z "$(echo $rvm_ruby_args | awk '/\.rb$/')" ] ; then
|
553
551
|
#if [[ $rvm_ruby_args =~ '\.rb$' ]] ; then
|
554
552
|
if [ -z "$prefix" ] ; then prefix="-S" ; fi
|
555
|
-
if [[ ! $rvm_ruby_args =~ $prefix ]] ; then
|
553
|
+
if [[ ! -z "$rvm_ruby_args" ]] && [[ ! "$rvm_ruby_args" =~ "$prefix" ]] ; then
|
556
554
|
rvm_ruby_args="$prefix $rvm_ruby_args"
|
557
555
|
fi
|
558
556
|
fi
|
@@ -621,10 +619,10 @@ function __rvm_summary {
|
|
621
619
|
export successes errors statuses
|
622
620
|
summary="\nSummary:\n\n"
|
623
621
|
if [ ${#successes[*]} -gt 0 ] ; then
|
624
|
-
summary="$summary \033[0;32m${#successes[*]} successful: $(echo "${successes[*]}" | sed 's
|
622
|
+
summary="$summary \033[0;32m${#successes[*]} successful: $(echo "${successes[*]}" | sed 's# #, #g')\033[0m\n"
|
625
623
|
fi
|
626
624
|
if [ ${#errors[*]} -gt 0 ] ; then
|
627
|
-
summary="$summary \033[0;31m${#errors[*]} errors: $(echo "${errors[*]}" | sed 's
|
625
|
+
summary="$summary \033[0;31m${#errors[*]} errors: $(echo "${errors[*]}" | sed 's# #, #g')\033[0m\n"
|
628
626
|
fi
|
629
627
|
total=${#rubies[*]}
|
630
628
|
if [ ! -z "$ZSH_VERSION" ] ; then array_start=1 ; else array_start=0 ; fi
|
@@ -654,8 +652,8 @@ function __rvm_yaml {
|
|
654
652
|
function __rvm_json {
|
655
653
|
json="{"
|
656
654
|
json="$json\n \"totals\": { \"rubies\": ${#rubies[*]}, \"successes\": ${#successes[*]}, \"errors\": ${#errors[*]}},"
|
657
|
-
json="$json\n \"successful\": [ "$(echo ${successes[*]} | sed 's
|
658
|
-
json="$json\n \"errors\": [ "$(echo ${errors[*]} | sed 's
|
655
|
+
json="$json\n \"successful\": [ "$(echo ${successes[*]} | sed 's# #", "#g')" ],"
|
656
|
+
json="$json\n \"errors\": [ "$(echo ${errors[*]} | sed 's# #", "#g')" ],"
|
659
657
|
json="$json\n \"rubies\": {"
|
660
658
|
|
661
659
|
total=${#rubies[*]}
|
@@ -753,6 +751,7 @@ function __rvm_inspect {
|
|
753
751
|
# ruby supporting libraries:
|
754
752
|
#
|
755
753
|
function __rvm_readline_install {
|
754
|
+
__rvm_make_flags
|
756
755
|
__rvm_pushpop $rvm_src_path
|
757
756
|
package="readline" ; version="5.2" ; archive_format="tar.gz"
|
758
757
|
# TODO: Figure out how to list, grab and apply the patches
|
@@ -761,10 +760,10 @@ function __rvm_readline_install {
|
|
761
760
|
__rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format"
|
762
761
|
cd "$rvm_src_path/$package-$version"
|
763
762
|
if [ "Darwin" = "$(uname)" ] ; then
|
764
|
-
sdk=$(ls -t /Developer/SDKs/ | head -n 1)
|
765
|
-
CFLAGS="-isysroot /Developer/SDKs/$sdk -arch i386 -arch x86_64"
|
766
|
-
LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/$sdk -arch i386 -arch x86_64"
|
767
|
-
export CFLAGS LDFLAGS
|
763
|
+
#sdk=$(ls -t /Developer/SDKs/ | head -n 1)
|
764
|
+
#CFLAGS="-isysroot /Developer/SDKs/$sdk -arch i386 -arch x86_64"
|
765
|
+
#LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/$sdk -arch i386 -arch x86_64"
|
766
|
+
#export CFLAGS LDFLAGS
|
768
767
|
__rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr --disable-dependency-tracking --disable-static --enable-shared" "Configuring $package"
|
769
768
|
else
|
770
769
|
__rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr --disable-dependency-tracking --disable-static --enable-shared" "Configuring $package"
|
@@ -775,18 +774,80 @@ function __rvm_readline_install {
|
|
775
774
|
}
|
776
775
|
|
777
776
|
function __rvm_iconv_install {
|
777
|
+
__rvm_make_flags
|
778
778
|
__rvm_pushpop $rvm_src_path
|
779
779
|
package="libiconv" ; version=1.13.1 ; archive_format="tar.gz"
|
780
780
|
__rvm_log "info" "Retrieving $package-$version.$archive_format"
|
781
781
|
__rvm_fetch "http://ftp.gnu.org/pub/gnu/libiconv/$package-$version.$archive_format"
|
782
782
|
__rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format"
|
783
783
|
cd "$rvm_src_path/$package-$version"
|
784
|
-
__rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr
|
784
|
+
__rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr" "Configuring $package."
|
785
785
|
__rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package"
|
786
786
|
__rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_path/usr"
|
787
787
|
__rvm_pushpop
|
788
788
|
}
|
789
789
|
|
790
|
+
function __rvm_openssl_install {
|
791
|
+
__rvm_make_flags
|
792
|
+
__rvm_pushpop $rvm_src_path
|
793
|
+
package="openssl" ; version="0.9.8k" ; archive_format="tar.gz"
|
794
|
+
__rvm_log "info" "Retrieving $package-$version.$archive_format"
|
795
|
+
__rvm_fetch "http://www.openssl.org/source/$package-$version.tar.gz"
|
796
|
+
__rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format"
|
797
|
+
cd "$rvm_src_path/$package-$version"
|
798
|
+
__rvm_run "$package/config" "./config --prefix=$rvm_path/usr zlib no-asm no-krb5 shared" "Configuring $package."
|
799
|
+
__rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package"
|
800
|
+
__rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_path/usr"
|
801
|
+
__rvm_pushpop
|
802
|
+
}
|
803
|
+
|
804
|
+
function __rvm_zlib_install {
|
805
|
+
__rvm_make_flags
|
806
|
+
__rvm_pushpop $rvm_src_path
|
807
|
+
package="zlib" ; version="1.2.3" ; archive_format="tar.gz"
|
808
|
+
__rvm_log "info" "Retrieving $package-$version.$archive_format"
|
809
|
+
__rvm_fetch "http://www.zlib.net/$package-$version.tar.gz"
|
810
|
+
__rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format"
|
811
|
+
cd "$rvm_src_path/$package-$version"
|
812
|
+
__rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr" "Configuring $package."
|
813
|
+
__rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package"
|
814
|
+
__rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_path/usr"
|
815
|
+
__rvm_pushpop
|
816
|
+
}
|
817
|
+
|
818
|
+
function __rvm_ncurses_install {
|
819
|
+
__rvm_make_flags
|
820
|
+
__rvm_pushpop $rvm_src_path
|
821
|
+
package="ncurses" ; version="5.7" ; archive_format="tar.gz"
|
822
|
+
__rvm_log "info" "Retrieving $package"
|
823
|
+
__rvm_fetch "ftp://invisible-island.net/ncurses/ncurses.tar.gz"
|
824
|
+
__rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package.$archive_format -C $rvm_src_path" "Extracting $package.$archive_format"
|
825
|
+
cd "$rvm_src_path/$package-$version"
|
826
|
+
__rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr --with-shared --disable-rpath --without-debug --without-ada --enable-safe-sprintf --enable-sigwinch --without-progs" "Configuring $package."
|
827
|
+
__rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package"
|
828
|
+
__rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_path/usr"
|
829
|
+
__rvm_pushpop
|
830
|
+
}
|
831
|
+
|
832
|
+
__rvm_make_flags() {
|
833
|
+
PATH=.rvm/usr/bin:$PATH ; export PATH
|
834
|
+
if [ "Darwin" = "$(uname)" ] ; then
|
835
|
+
sdk="$(/bin/ls -t /Developer/SDKs/ | head -n 1)"
|
836
|
+
if [ "Darwin" = "$(uname)" ] ; then
|
837
|
+
if [[ "$(sw_vers -productVersion)" =~ ^10.6 ]] ; then
|
838
|
+
rvm_archflags="-arch x86_64"
|
839
|
+
openssl_os="os/compiler darwin64-x86_64-cc"
|
840
|
+
else
|
841
|
+
rvm_archflags="-arch i386"
|
842
|
+
openssl_os="os/compiler darwin-i386-cc"
|
843
|
+
fi
|
844
|
+
fi
|
845
|
+
CFLAGS="-isysroot /Developer/SDKs/$sdk $rvm_archflags" ; export CFLAGS
|
846
|
+
LDFLAGS="-Wl,-syslibroot /Developer/SDKs/$sdk $rvm_archflags" ; export LDFLAGS
|
847
|
+
ARCHFLAGS="$rvm_archflags" ; export ARCHFLAGS
|
848
|
+
fi
|
849
|
+
}
|
850
|
+
|
790
851
|
__rvm_monitor() {
|
791
852
|
if [ -d test/ ] ; then
|
792
853
|
:
|
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.61
|
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-20 00:00:00 -04:00
|
13
13
|
default_executable: rvm-install
|
14
14
|
dependencies: []
|
15
15
|
|