rvm 0.0.25 → 0.0.26
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/bin/rvm-install +1 -1
- data/bin/rvm-update +1 -1
- data/rvm.gemspec +2 -2
- data/scripts/rvm +160 -165
- data/scripts/rvm-install +7 -4
- data/scripts/rvm-update +5 -2
- metadata +2 -2
data/bin/rvm-install
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
# Hot potato!!! Bash it!
|
4
|
-
|
4
|
+
%x["bash -l -c 'cd #{File.dirname(File.dirname(__FILE__))} && ./scripts/rvm-install #{ARGV.join(' ')} && source ~/.rvm/scripts/rvm'"]
|
5
5
|
|
data/bin/rvm-update
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
# Hot potato!!! Bash it!
|
4
|
-
|
4
|
+
%x["bash -l -c 'cd #{File.dirname(File.dirname(__FILE__))} && ./scripts/rvm-update #{ARGV.join(' ')} && source ~/.rvm/scripts/rvm'"]
|
5
5
|
|
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.26"
|
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-08-
|
12
|
+
s.date = %q{2009-08-31}
|
13
13
|
s.description = %q{Manages Ruby interpreter installations and switching between them.}
|
14
14
|
s.email = %q{wayneeseguin@gmail.com}
|
15
15
|
s.executables = ["rvm-install", "rvm-update"]
|
data/scripts/rvm
CHANGED
@@ -7,32 +7,23 @@
|
|
7
7
|
#
|
8
8
|
# Functions
|
9
9
|
#
|
10
|
-
function
|
10
|
+
function __rvm_meta {
|
11
11
|
rvm_meta_author="Wayne E. Seguin"
|
12
12
|
rvm_meta_author_email="wayneeseguin@gmail.com"
|
13
13
|
rvm_meta_website="http://rvm.beginrescueend.com/"
|
14
|
-
rvm_meta_version="0.0.
|
15
|
-
rvm_meta_updated="2009.08.
|
14
|
+
rvm_meta_version="0.0.26"
|
15
|
+
rvm_meta_updated="2009.08.31"
|
16
16
|
}
|
17
17
|
|
18
|
-
function
|
18
|
+
function __rvm_version { __rvm_meta ; echo "rvm $rvm_meta_version ($rvm_meta_updated) [$rvm_meta_website]" ; }
|
19
19
|
|
20
|
-
function
|
20
|
+
function __rvm_usage {
|
21
21
|
|
22
|
-
|
22
|
+
__rvm_meta
|
23
23
|
|
24
24
|
cat <<-Usage
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
rvm ${rvm_meta_version} ${rvm_meta_website}
|
29
|
-
|
30
|
-
by ${rvm_meta_author} (${rvm_meta_author_email})
|
31
|
-
|
32
|
-
Installation:
|
33
|
-
|
34
|
-
$ gem install rvm # Install the rvm gem
|
35
|
-
$ rvm-install # Install rvm, adds hooks for bash & zsh
|
26
|
+
rvm ${rvm_meta_version} ${rvm_meta_website} by ${rvm_meta_author} (${rvm_meta_author_email})
|
36
27
|
|
37
28
|
Usage:
|
38
29
|
|
@@ -53,15 +44,17 @@ function rvm-usage {
|
|
53
44
|
reset - Remove default and current settings, exit the shell.
|
54
45
|
(If you experience odd behavior try this first)
|
55
46
|
reload - Reload rvm source itself (useful after changing rvm source)
|
47
|
+
rubydo - Used with -f to run a ruby file against specified or all rubies
|
56
48
|
debug - Emit environment & configuration information for *current* ruby
|
57
49
|
|
58
50
|
Implementation:
|
59
51
|
|
60
52
|
* ruby - MRI/YARV Ruby (The Standard), defaults to 1.8.6
|
61
53
|
jruby - jRuby
|
54
|
+
rubinius - Rubinius
|
62
55
|
ree - Ruby Enterprise Edition
|
63
|
-
|
64
|
-
|
56
|
+
system - Use the system ruby (eg. pre-rvm state)
|
57
|
+
default - Use rvm set default ruby and system if it hasn't been set.
|
65
58
|
|
66
59
|
Options:
|
67
60
|
|
@@ -72,15 +65,33 @@ function rvm-usage {
|
|
72
65
|
-c|--configure - Options for source compile (default: --enable-shared)
|
73
66
|
-a|--archives - Directory to place downladed files into (~/.rvm/archives/)
|
74
67
|
-n|--nice - Niceness level (default: 0)
|
75
|
-
-d|--debug - Toggle debug mode on for very verbose output.
|
76
68
|
-m|--gem-set - Named gem set for switching between different gem sets
|
77
69
|
--rm-gem-set - Removes a named gemset.
|
78
70
|
|
71
|
+
-l|--level - Specify a patch level to use
|
72
|
+
-t|--tag -
|
73
|
+
-r|--rev - Specify the repository revision # to use or 'head' for
|
74
|
+
|
75
|
+
-P|--prefix - Sets the prefix path for installs to be installed to
|
76
|
+
-B|--bin - Specifies the path for binaries to be placed
|
77
|
+
-S|--source - Specifies the src directory to use
|
78
|
+
-A|--archive - Specifies the archive directory to use (tabralls / zips)
|
79
|
+
-G|--gems - Specifies the root gem path to use
|
80
|
+
-C|--configure - Specifies any custom command line configure options
|
81
|
+
-M|--make - Specify a custom make command
|
82
|
+
-I|--make-install - " a custom make install command
|
83
|
+
|
84
|
+
-n|--nice - Specify a process niceness (for slow computers)
|
85
|
+
-f|--file - Specify a ruby file to run with 'rubydo' command
|
86
|
+
-h|--help - Emit this output and exit
|
87
|
+
-d|--default - Set the default Ruby to a specified version
|
88
|
+
-m|--gem-set - Use a named gem set instead of the default set.
|
89
|
+
--rm-gem-set - Remove a named gem set
|
90
|
+
--debug - Toggle debug mode on for very verbose output.
|
91
|
+
|
79
92
|
Resources:
|
80
93
|
|
81
|
-
http://rvm.beginrescueend.com/
|
82
|
-
http://rvm.beginrescueend.com/examples/
|
83
|
-
http://rvm.beginrescueend.com/todo/
|
94
|
+
http://rvm.beginrescueend.com/
|
84
95
|
https://www.pivotaltracker.com/projects/26822
|
85
96
|
|
86
97
|
Usage
|
@@ -88,7 +99,7 @@ Usage
|
|
88
99
|
}
|
89
100
|
|
90
101
|
# Logging functions based on level
|
91
|
-
function
|
102
|
+
function __rvm_log {
|
92
103
|
|
93
104
|
case "$1" in
|
94
105
|
debug) shift ; echo -e "\n\033[0;35m <d> $* \033[0m" ;;
|
@@ -99,22 +110,22 @@ function rvm-log {
|
|
99
110
|
esac
|
100
111
|
}
|
101
112
|
|
102
|
-
function
|
113
|
+
function __rvm_clean-path {
|
103
114
|
PATH=`echo $PATH | tr -s ':' '\n' | awk '!($0 in a){a[$0];print}' | tr -s '\n' ':'`
|
104
115
|
PATH="${PATH%:}"
|
105
116
|
export PATH
|
106
117
|
}
|
107
118
|
|
108
|
-
function
|
119
|
+
function __rvm_remove-from-path {
|
109
120
|
PATH=`echo $PATH | tr -s ':' '\n' | grep -v "\.rvm" | tr -s '\n' ':'`
|
110
121
|
PATH="${PATH%:}"
|
111
122
|
export PATH
|
112
123
|
}
|
113
124
|
|
114
|
-
function
|
115
|
-
function
|
125
|
+
function __rvm_gi { gem install -q --no-rdoc --no-ri $* ; }
|
126
|
+
function __rvm_gems-install { for gem in $* ; do __rvm_gi $gem ; done }
|
116
127
|
|
117
|
-
function
|
128
|
+
function __rvm_set-defaults {
|
118
129
|
|
119
130
|
# TODO: Store defaults in "defaults/" dir.
|
120
131
|
if [ ! -f $rvm_install_path/default ] ; then
|
@@ -128,16 +139,16 @@ function rvm-set-defaults {
|
|
128
139
|
if [ -s $rvm_install_path/default_path ] ; then
|
129
140
|
rvm_default_path=`cat $rvm_install_path/default_path`
|
130
141
|
else
|
131
|
-
|
132
|
-
|
142
|
+
__rvm_clean-path # Clean the path the first time we compute default path.
|
143
|
+
__rvm_remove-from-path
|
133
144
|
echo $PATH > $rvm_install_path/default_path
|
134
145
|
rvm_default_path=$PATH
|
135
146
|
fi
|
136
147
|
|
137
|
-
rvm_default_ps1=`
|
148
|
+
rvm_default_ps1=`__rvm_cache rvm_default_ps1`
|
138
149
|
if [ -z "$rvm_default_ps1" ] ; then
|
139
150
|
rvm_default_ps1=$PS1
|
140
|
-
|
151
|
+
__rvm_cache "rvm_default_ps1" "$rvm_default_ps1"
|
141
152
|
fi
|
142
153
|
|
143
154
|
if [ -s $rvm_install_path/default_user_gem_path ] ; then
|
@@ -161,11 +172,11 @@ function rvm-set-defaults {
|
|
161
172
|
|
162
173
|
}
|
163
174
|
|
164
|
-
function
|
175
|
+
function __rvm_initialize {
|
165
176
|
|
166
177
|
rvm_curl=`which curl`
|
167
178
|
if [ $? -ne 0 ] ; then
|
168
|
-
|
179
|
+
__rvm_log "fail" "rvm expects that curl is available, which curl shows no curl :("
|
169
180
|
else
|
170
181
|
rvm_curl="$rvm_curl -O -L -s -C - "
|
171
182
|
fi
|
@@ -174,7 +185,7 @@ function rvm-initialize {
|
|
174
185
|
|
175
186
|
# TODO: Sanitize user input, ensure that there is a / a the end...
|
176
187
|
if [ "`whoami`" = "root" ] ; then
|
177
|
-
|
188
|
+
__rvm_log "fail" "root user support is not yet implemented."
|
178
189
|
#rvm_prefix_path=${rvm_prefix_path:-/usr/local/}
|
179
190
|
else
|
180
191
|
rvm_prefix_path=${rvm_prefix_path:-"$HOME/."}
|
@@ -199,7 +210,7 @@ function rvm-initialize {
|
|
199
210
|
if [ ! -z "$rvm_ruby_configure" ] ; then
|
200
211
|
rvm_ruby_configure="$(echo $rvm_ruby_configure | tr ',-' ' -')"
|
201
212
|
fi
|
202
|
-
|
213
|
+
__rvm_clean-path
|
203
214
|
rvm_result=$(echo $PATH | grep 'rvm\/bin:')
|
204
215
|
if [ -z $rvm_result ] ; then
|
205
216
|
PATH=$rvm_bin_path:$PATH ; export PATH
|
@@ -208,7 +219,7 @@ function rvm-initialize {
|
|
208
219
|
mkdir -p $rvm_source_path $rvm_install_path/bin $rvm_archives_path
|
209
220
|
}
|
210
221
|
|
211
|
-
function
|
222
|
+
function __rvm_curl {
|
212
223
|
|
213
224
|
pushd $rvm_archives_path > /dev/null
|
214
225
|
eval $rvm_curl "$1"
|
@@ -216,11 +227,11 @@ function rvm-curl {
|
|
216
227
|
|
217
228
|
}
|
218
229
|
|
219
|
-
function
|
230
|
+
function __rvm_install-source {
|
220
231
|
|
221
|
-
if [ -z "$rvm_selected" ] ; then
|
232
|
+
if [ -z "$rvm_selected" ] ; then __rvm_select $* ; fi
|
222
233
|
|
223
|
-
|
234
|
+
__rvm_log "info" "Installing Ruby from source to: $rvm_install_path/$rvm_ruby_package_name"
|
224
235
|
mkdir -p $rvm_log_path/$rvm_ruby_package_name
|
225
236
|
|
226
237
|
pushd $rvm_source_path > /dev/null
|
@@ -228,10 +239,10 @@ function rvm-install-source {
|
|
228
239
|
if [ -z "$rvm_ruby_tag" -a -z "$rvm_ruby_rev" ] ; then
|
229
240
|
if [ ! -d $rvm_source_path/$rvm_ruby_package_name ] ; then
|
230
241
|
rvm_url="${rvm_url:-"ftp://ftp.ruby-lang.org/pub/ruby/1.$rvm_major_version/$rvm_ruby_package_name.tar.gz"}"
|
231
|
-
|
232
|
-
|
242
|
+
__rvm_log "info" "\tDownloading $rvm_ruby_package_name, this may take a while depending on your connection..."
|
243
|
+
__rvm_curl $rvm_url
|
233
244
|
|
234
|
-
|
245
|
+
__rvm_log "info" "\tExtracting $rvm_ruby_package_name ..."
|
235
246
|
mkdir -p $rvm_source_path/$rvm_ruby_package_name
|
236
247
|
nice -n $rvm_niceness tar xzf $rvm_archives_path/$rvm_ruby_package_name.tar.gz -C $rvm_source_path
|
237
248
|
fi
|
@@ -250,7 +261,7 @@ function rvm-install-source {
|
|
250
261
|
rvm_rev="-r $rvm_ruby_rev"
|
251
262
|
fi
|
252
263
|
fi
|
253
|
-
|
264
|
+
__rvm_log "info" "\tRetrieving Ruby from $rvm_url"
|
254
265
|
mkdir -p $rvm_source_path/$rvm_ruby_package_name
|
255
266
|
# TODO: Instead of always forcing, check if it's already svn for correct url and simply check out required revision
|
256
267
|
svn checkout -q $rvm_rev --force $rvm_url $rvm_source_path/$rvm_ruby_package_name
|
@@ -259,20 +270,20 @@ function rvm-install-source {
|
|
259
270
|
fi
|
260
271
|
|
261
272
|
if [ -s ./configure ] ; then
|
262
|
-
|
273
|
+
__rvm_log "info" "\tConfiguring $rvm_ruby_package_name using ${rvm_ruby_configure:-"--enable-shared"}, this may take a while depending on your cpu(s)..."
|
263
274
|
nice -n $rvm_niceness ./configure --prefix=$rvm_install_path/$rvm_ruby_package_name ${rvm_ruby_configure:-"--enable-shared"} > $rvm_log_path/$rvm_ruby_package_name/configure.log 2> $rvm_log_path/$rvm_ruby_package_name/configure.error.log
|
264
275
|
else
|
265
|
-
|
276
|
+
__rvm_log "warn" "\tSkipping configure step, ./configure file does not exist."
|
266
277
|
fi
|
267
278
|
|
268
|
-
|
279
|
+
__rvm_log "info" "\tCompiling $rvm_ruby_package_name, this may take a while, depending on your cpu(s)..."
|
269
280
|
if [ -z "$rvm_ruby_make" ] ; then
|
270
281
|
nice -n $rvm_niceness make > $rvm_log_path/$rvm_ruby_package_name/make.log 2> $rvm_log_path/$rvm_ruby_package_name/make.error.log
|
271
282
|
else
|
272
283
|
nice -n $rvm_niceness $rvm_ruby_make > $rvm_log_path/$rvm_ruby_package_name/install.log 2> $rvm_log_path/$rvm_ruby_package_name/install.error.log
|
273
284
|
fi
|
274
285
|
if [ -z "$rvm_ruby_make" ] ; then
|
275
|
-
|
286
|
+
__rvm_log "info" "\tInstalling $rvm_ruby_package_name"
|
276
287
|
nice -n $rvm_niceness make install > $rvm_log_path/$rvm_ruby_package_name/install.log 2> $rvm_log_path/$rvm_ruby_package_name/install.error.log
|
277
288
|
else
|
278
289
|
nice -n $rvm_niceness $rvm_ruby_make_install > $rvm_log_path/$rvm_ruby_package_name/install.log 2> $rvm_log_path/$rvm_ruby_package_name/install.error.log
|
@@ -282,13 +293,13 @@ function rvm-install-source {
|
|
282
293
|
|
283
294
|
ln -fs $rvm_install_path/$rvm_ruby_package_name/bin/ruby $rvm_install_path/bin/$rvm_ruby_package_name
|
284
295
|
|
285
|
-
|
296
|
+
__rvm_log "info" "\tInstalling rubygems dedicated to $rvm_ruby_package_name..."
|
286
297
|
rvm_gem_package_name="rubygems-1.3.5"
|
287
298
|
rvm_gem_url="http://rubyforge.org/frs/download.php/60718/$rvm_gem_package_name.tgz"
|
288
299
|
if [ -d $rvm_source_path/$rvm_gem_package_name ] ; then
|
289
300
|
cd $rvm_source_path/$rvm_gem_package_name
|
290
301
|
else
|
291
|
-
|
302
|
+
__rvm_curl $rvm_gem_url
|
292
303
|
mkdir -p $rvm_source_path/$rvm_gem_package_name
|
293
304
|
nice -n $rvm_niceness tar zxf $rvm_archives_path/$rvm_gem_package_name.tgz -C $rvm_source_path
|
294
305
|
fi
|
@@ -297,17 +308,17 @@ function rvm-install-source {
|
|
297
308
|
|
298
309
|
nice -n $rvm_niceness $rvm_install_path/$rvm_ruby_package_name/bin/ruby $rvm_source_path/$rvm_gem_package_name/setup.rb > $rvm_log_path/$rvm_ruby_package_name/rubygems.install.log 2> $rvm_log_path/$rvm_ruby_package_name/rubygems.install.error.log
|
299
310
|
popd > /dev/null
|
300
|
-
|
311
|
+
__rvm_log "info" "Installation of $rvm_ruby_package_name complete."
|
301
312
|
|
302
313
|
for rvm_gem_name in rake ; do
|
303
|
-
|
314
|
+
__rvm_log "info" "Installing $rvm_gem_name"
|
304
315
|
nice -n $rvm_niceness $rvm_install_path/$rvm_ruby_package_name/bin/gem install $rvm_gem_name --no-rdoc --no-ri -q >> $rvm_log_path/$rvm_ruby_package_name/gems.install.log 2> $rvm_log_path/$rvm_ruby_package_name/gems.error.log
|
305
316
|
done
|
306
317
|
}
|
307
318
|
|
308
|
-
function
|
319
|
+
function __rvm_install-ruby {
|
309
320
|
|
310
|
-
if [ -z "$rvm_selected" ] ; then
|
321
|
+
if [ -z "$rvm_selected" ] ; then __rvm_select $* ; fi
|
311
322
|
|
312
323
|
if [ -z "$RUBYOPT" ] ; then ruby_options=$RUBYOPT ; unset RUBYOPT ; fi
|
313
324
|
|
@@ -334,33 +345,33 @@ function rvm-install-ruby {
|
|
334
345
|
rvm_ruby_rev="-r $rvm_ruby_rev"
|
335
346
|
fi
|
336
347
|
fi
|
337
|
-
|
348
|
+
__rvm_log "info" "\tRetrieving MacRuby from $rvm_url"
|
338
349
|
#mkdir -p $rvm_source_path/$rvm_ruby_package_name
|
339
350
|
# TODO: Instead of always forcing, check if it's already svn for correct url and simply check out required revision
|
340
351
|
#svn checkout -q $rvm_rev --force $rvm_url $rvm_source_path/$rvm_ruby_package_name
|
341
352
|
cd $rvm_source_path/$rvm_ruby_package_name
|
342
|
-
|
353
|
+
__rvm_install-source
|
343
354
|
unset DESTDIR
|
344
355
|
else
|
345
|
-
|
356
|
+
__rvm_log "fail" "MacRuby can only be installed on a Darwin OS."
|
346
357
|
fi
|
347
358
|
;;
|
348
359
|
|
349
360
|
ruby-enterprise|ree)
|
350
361
|
rvm_url="http://rubyforge.org/frs/download.php/58677/$rvm_ruby_package_name.tar.gz"
|
351
|
-
|
362
|
+
__rvm_log "info" "Installing Ruby Enterprise Edition from source to: $rvm_install_path/$rvm_ruby_package_name"
|
352
363
|
pushd $rvm_source_path > /dev/null
|
353
364
|
if [ -d $rvm_source_path/$rvm_ruby_package_name ] ; then
|
354
365
|
cd $rvm_source_path/$rvm_ruby_package_name
|
355
366
|
else
|
356
|
-
|
357
|
-
|
358
|
-
|
367
|
+
__rvm_log "info" "\tDownloading $rvm_ruby_package_name, this may take a while depending on your connection..."
|
368
|
+
__rvm_curl $rvm_url
|
369
|
+
__rvm_log "info" "\tExtracting $rvm_ruby_package_name..."
|
359
370
|
mkdir -p $rvm_source_path/$rvm_ruby_package_name
|
360
371
|
nice -n $rvm_niceness tar xzf $rvm_archives_path/$rvm_ruby_package_name.tar.gz -C $rvm_source_path
|
361
372
|
fi
|
362
373
|
|
363
|
-
|
374
|
+
__rvm_log "info" "\tInstalling $rvm_ruby_package_name, this may take a while, depending on your cpu(s)..."
|
364
375
|
mkdir -p $rvm_log_path/$rvm_ruby_package_name
|
365
376
|
|
366
377
|
cd $rvm_source_path/$rvm_ruby_package_name
|
@@ -369,13 +380,13 @@ function rvm-install-ruby {
|
|
369
380
|
|
370
381
|
ln -fs $rvm_install_path/$rvm_ruby_package_name/bin/ruby $rvm_install_path/bin/$rvm_ruby_package_name
|
371
382
|
|
372
|
-
|
383
|
+
__rvm_log "info" "\tInstalling rubygems dedicated to $rvm_ruby_package_name..."
|
373
384
|
rvm_gem_package_name="rubygems-1.3.5"
|
374
385
|
rvm_gem_url="http://rubyforge.org/frs/download.php/60718/$rvm_gem_package_name.tgz"
|
375
386
|
if [ -d $rvm_source_path/$rvm_gem_package_name ] ; then
|
376
387
|
cd $rvm_source_path/$rvm_gem_package_name
|
377
388
|
else
|
378
|
-
|
389
|
+
__rvm_curl $rvm_gem_url
|
379
390
|
mkdir -p $rvm_source_path/$rvm_gem_package_name
|
380
391
|
nice -n $rvm_niceness tar zxf $rvm_archives_path/$rvm_gem_package_name.tgz -C $rvm_source_path
|
381
392
|
fi
|
@@ -383,16 +394,16 @@ function rvm-install-ruby {
|
|
383
394
|
sed -i.orig "s/require_paths\.join/require_paths.to_a.join/" $rvm_source_path/$rvm_gem_package_name/lib/rubygems/gem_path_searcher.rb > $rvm_log_path/$rvm_ruby_package_name/rubygems.install.log 2> $rvm_log_path/$rvm_ruby_package_name/rubygems.install.error.log
|
384
395
|
|
385
396
|
nice -n $rvm_niceness $rvm_install_path/$rvm_ruby_package_name/bin/ruby $rvm_source_path/$rvm_gem_package_name/setup.rb > $rvm_log_path/$rvm_ruby_package_name/rubygems.install.log 2> $rvm_log_path/$rvm_ruby_package_name/rubygems.install.error.log
|
386
|
-
|
397
|
+
__rvm_log "info" "Installation of $rvm_ruby_package_name complete."
|
387
398
|
popd > /dev/null
|
388
399
|
|
389
400
|
for rvm_gem_name in rake ; do
|
390
|
-
|
401
|
+
__rvm_log "info" "Installing $rvm_gem_name"
|
391
402
|
nice -n $rvm_niceness $rvm_install_path/$rvm_ruby_package_name/bin/gem install $rvm_gem_name --no-rdoc --no-ri -q >> $rvm_log_path/$rvm_ruby_package_name/gems.install.log 2> $rvm_log_path/$rvm_ruby_package_name/gems.error.log
|
392
403
|
done
|
393
404
|
;;
|
394
405
|
|
395
|
-
rubinius)
|
406
|
+
rbx|rubinius)
|
396
407
|
rvm_ruby_repo_url=$rvm_rubinius_repo_url
|
397
408
|
rvm_ruby_configure=""
|
398
409
|
rvm_ruby_make="rake"
|
@@ -414,7 +425,7 @@ function rvm-install-ruby {
|
|
414
425
|
rvm_url="http://dist.codehaus.org/$rvm_ruby_interpreter/$rvm_ruby_version/$rvm_package_file.zip"
|
415
426
|
rvm_jruby_repo_url="${rvm_jruby_repo_url:-"git://kenai.com/jruby~main"}"
|
416
427
|
|
417
|
-
|
428
|
+
__rvm_log "info" "Installing jRuby to: $rvm_install_path/$rvm_ruby_package_name"
|
418
429
|
mkdir -p $rvm_log_path/$rvm_ruby_package_name
|
419
430
|
pushd $rvm_source_path > /dev/null
|
420
431
|
|
@@ -428,15 +439,15 @@ function rvm-install-ruby {
|
|
428
439
|
if [ -d $rvm_source_path/$rvm_ruby_package_name ] ; then
|
429
440
|
cd $rvm_source_path/$rvm_ruby_package_name
|
430
441
|
else
|
431
|
-
|
432
|
-
|
433
|
-
|
442
|
+
__rvm_log "info" "\tDownloading $rvm_package_file, this may take a while depending on your connection..."
|
443
|
+
__rvm_curl $rvm_url
|
444
|
+
__rvm_log "info" "\tExtracting $rvm_package_file..."
|
434
445
|
nice -n $rvm_niceness unzip -q $rvm_archives_path/$rvm_package_file.zip -d $rvm_source_path
|
435
446
|
cd $rvm_source_path/$rvm_ruby_package_name
|
436
447
|
fi
|
437
448
|
fi
|
438
449
|
|
439
|
-
|
450
|
+
__rvm_log "info" "\tInstalling $rvm_ruby_package_name..."
|
440
451
|
mkdir -p $rvm_install_path/$rvm_ruby_package_name/bin/
|
441
452
|
rsync -ag $rvm_source_path/$rvm_ruby_package_name/ $rvm_install_path/$rvm_ruby_package_name/
|
442
453
|
cd $rvm_source_path/$rvm_ruby_package_name/tool/nailgun && make > $rvm_log_path/$rvm_ruby_package_name/install.nailgun.log 2> $rvm_log_path/$rvm_ruby_package_name/install.error.nailgun.log
|
@@ -449,19 +460,19 @@ function rvm-install-ruby {
|
|
449
460
|
ln -fs $rvm_install_path/$rvm_ruby_package_name/bin/ruby $rvm_install_path/bin/$rvm_ruby_package_name
|
450
461
|
|
451
462
|
for rvm_gem_name in rake jruby-openssl ; do
|
452
|
-
|
463
|
+
__rvm_log "info" "Installing $rvm_gem_name"
|
453
464
|
nice -n $rvm_niceness $rvm_install_path/$rvm_ruby_package_name/bin/jgem install $rvm_gem_name --no-rdoc --no-ri -q >> $rvm_log_path/$rvm_ruby_package_name/gems.install.log 2> $rvm_log_path/$rvm_ruby_package_name/gems.error.log
|
454
465
|
done
|
455
466
|
;;
|
456
467
|
|
457
468
|
ruby)
|
458
|
-
|
469
|
+
__rvm_install-source $*
|
459
470
|
;;
|
460
471
|
|
461
472
|
default)
|
462
|
-
|
473
|
+
__rvm_log "fail" "please specify a ruby implementation to install."
|
463
474
|
;;
|
464
|
-
*)
|
475
|
+
*) __rvm_log "fail" "Ruby implementation '$rvm_ruby_interpreter' is not known."
|
465
476
|
|
466
477
|
esac
|
467
478
|
|
@@ -471,17 +482,17 @@ function rvm-install-ruby {
|
|
471
482
|
|
472
483
|
}
|
473
484
|
|
474
|
-
function
|
485
|
+
function __rvm_uninstall {
|
475
486
|
|
476
|
-
if [ -z "$rvm_selected" ] ; then
|
487
|
+
if [ -z "$rvm_selected" ] ; then __rvm_select $* ; fi
|
477
488
|
|
478
489
|
if [ ! -z "$rvm_ruby_package_name" ] ; then
|
479
490
|
for dir in $rvm_source_path $rvm_install_path ; do
|
480
491
|
if [ -d $dir/$rvm_ruby_package_name ] ; then
|
481
|
-
|
492
|
+
__rvm_log "info" "Removing $dir/$rvm_ruby_package_name..."
|
482
493
|
rm -rf $dir/$rvm_ruby_package_name
|
483
494
|
else
|
484
|
-
|
495
|
+
__rvm_log "info" "it seems that $dir/$rvm_ruby_package_name is already non existent."
|
485
496
|
fi
|
486
497
|
if [ -e $rvm_bin_path/$rvm_ruby_package_name ] ; then
|
487
498
|
rm -f $rvm_bin_path/$rvm_ruby_package_name
|
@@ -489,13 +500,13 @@ function rvm-uninstall {
|
|
489
500
|
done ; unset dir
|
490
501
|
rm -rf $rvm_gem_path/$rvm_ruby_interpreter/$rvm_ruby_version*/
|
491
502
|
else
|
492
|
-
|
503
|
+
__rvm_log "fail" "Cannot uninstall unknown package '$rvm_ruby_package_name'"
|
493
504
|
fi
|
494
505
|
|
495
506
|
}
|
496
507
|
|
497
|
-
#
|
498
|
-
function
|
508
|
+
# __rvm_select implementation version patch_level
|
509
|
+
function __rvm_select {
|
499
510
|
|
500
511
|
rvm_ruby_interpreter="${1:-$rvm_ruby_interpreter}"
|
501
512
|
rvm_ruby_interpreter="${rvm_ruby_interpreter:-ruby}" # Default is standard ruby
|
@@ -510,11 +521,12 @@ function rvm-select {
|
|
510
521
|
rvm_ruby_version="head" # For now we are only supporting latest
|
511
522
|
unset rvm_ruby_patch_level
|
512
523
|
else
|
513
|
-
|
524
|
+
__rvm_log "fail" "MacRuby can only be installed on a Darwin OS."
|
514
525
|
fi
|
515
526
|
;;
|
516
527
|
|
517
|
-
rubinius)
|
528
|
+
rbx|rubinius)
|
529
|
+
rvm_ruby_version="head"
|
518
530
|
rvm_ruby_version="head"
|
519
531
|
unset rvm_ruby_patch_level
|
520
532
|
rvm_ruby_repo_url=$rvm_rubinius_repo_url
|
@@ -528,7 +540,7 @@ function rvm-select {
|
|
528
540
|
rvm_ruby_version="${rvm_ruby_version:-1.3.1}"
|
529
541
|
unset rvm_ruby_patch_level
|
530
542
|
if [ "$rvm_ruby_version" != "1.2.0" -a "$rvm_ruby_version" != "1.3.1" ] ; then
|
531
|
-
|
543
|
+
__rvm_log "fail" "Unknown jRuby version: $rvm_ruby_version"
|
532
544
|
fi
|
533
545
|
alias jruby_ng="jruby --ng"
|
534
546
|
alias jruby_ng_server="jruby --ng-server"
|
@@ -540,7 +552,7 @@ function rvm-select {
|
|
540
552
|
rvm_ruby_patch_level="${3:-20090610}"
|
541
553
|
|
542
554
|
if [ "$rvm_ruby_version" != "1.8.6" ] ; then
|
543
|
-
|
555
|
+
__rvm_log "fail" "Unknown Ruby Enterprise Edition version: $rvm_ruby_version"
|
544
556
|
fi
|
545
557
|
;;
|
546
558
|
|
@@ -570,19 +582,15 @@ function rvm-select {
|
|
570
582
|
unset rvm_ruby_patch_level
|
571
583
|
|
572
584
|
else
|
573
|
-
|
585
|
+
__rvm_log "fail" "Unknown ruby version: $rvm_ruby_version"
|
574
586
|
fi
|
575
587
|
;;
|
576
588
|
|
577
|
-
system
|
578
|
-
|
579
|
-
rvm-cleanup-variables
|
580
|
-
if [ -e $rvm_install_path/current ] ; then
|
581
|
-
source $rvm_install_path/current
|
582
|
-
fi
|
589
|
+
default|system)
|
590
|
+
#noop?
|
583
591
|
;;
|
584
592
|
*)
|
585
|
-
|
593
|
+
__rvm_log "fail" "Ruby implementation '$rvm_ruby_interpreter' is not known."
|
586
594
|
esac
|
587
595
|
|
588
596
|
if [ ! -z "$rvm_ruby_rev" ] ; then
|
@@ -625,17 +633,18 @@ function rvm-select {
|
|
625
633
|
|
626
634
|
}
|
627
635
|
|
628
|
-
function
|
636
|
+
function __rvm_use {
|
629
637
|
|
630
|
-
if [ -z "$rvm_selected" ] ; then
|
638
|
+
if [ -z "$rvm_selected" ] ; then __rvm_select $* ; fi
|
639
|
+
if [ -z "$rvm_ruby_interpreter" ] ; then rvm_ruby_interpreter="default" ; fi
|
631
640
|
|
632
|
-
if [ "$rvm_ruby_interpreter" = "default" -o "$rvm_ruby_interpreter" = "system"
|
641
|
+
if [ "$rvm_ruby_interpreter" = "default" -o "$rvm_ruby_interpreter" = "system" ] ; then
|
633
642
|
unset GEM_HOME MY_RUBY_HOME IRBRC
|
634
|
-
rvm-cleanup-variables
|
635
643
|
PATH="$rvm_default_path" ; export PATH
|
636
|
-
if [ -
|
644
|
+
if [ "$rvm_ruby_interpreter" = "default" -a -s $rvm_install_path/current ] ; then
|
637
645
|
source $rvm_install_path/current
|
638
646
|
fi
|
647
|
+
|
639
648
|
else
|
640
649
|
GEM_HOME=$rvm_gem_home ; export GEM_HOME
|
641
650
|
MY_RUBY_HOME=$rvm_ruby_home ; export MY_RUBY_HOME
|
@@ -643,8 +652,8 @@ function rvm-use {
|
|
643
652
|
|
644
653
|
# Install if not installed
|
645
654
|
if [ ! -d $MY_RUBY_HOME ] ; then
|
646
|
-
|
647
|
-
|
655
|
+
__rvm_log "warn" "$rvm_ruby_interpreter $rvm_ruby_version is not installed."
|
656
|
+
__rvm_install-ruby $rvm_ruby_interpreter $rvm_ruby_version $rvm_ruby_patch_level
|
648
657
|
fi
|
649
658
|
|
650
659
|
if [ ! -s "$rvm_ruby_irbrc" ] ; then
|
@@ -669,8 +678,9 @@ Config
|
|
669
678
|
fi
|
670
679
|
PATH=$MY_RUBY_HOME/bin:$GEM_HOME/bin:$rvm_default_path ; export PATH
|
671
680
|
|
672
|
-
|
673
|
-
|
681
|
+
rvm_prompt="$rvm_ruby_package_name" ; export rvm_prompt
|
682
|
+
if [ ! -z "$rvm_set_prompt" -a ! -z "$PS1" ] ; then
|
683
|
+
PS1="\033[0;32m${rvm_prompt}\033[0m:: ${rvm_default_ps1}" ; export PS1
|
674
684
|
fi
|
675
685
|
|
676
686
|
if [ ! -z "$rvm_set_default" ] ; then
|
@@ -688,7 +698,7 @@ Config
|
|
688
698
|
fi
|
689
699
|
}
|
690
700
|
|
691
|
-
function
|
701
|
+
function __rvm_symlinks {
|
692
702
|
|
693
703
|
mkdir -p ${rvm_install_path}/bin
|
694
704
|
for release in `/bin/ls $rvm_install_path | grep 'ruby-'` ; do
|
@@ -701,7 +711,7 @@ function rvm-symlinks {
|
|
701
711
|
|
702
712
|
}
|
703
713
|
|
704
|
-
function
|
714
|
+
function __rvm_list {
|
705
715
|
|
706
716
|
echo -e "\nruby:\n$(/bin/ls -l $rvm_install_path/ | awk '/ ruby-[1-2].*/ { print " - " $NF }')\n"
|
707
717
|
echo -e "jruby:\n$(/bin/ls -l $rvm_install_path/ | awk '/jruby-.*/ { print " - " $NF }')\n"
|
@@ -710,9 +720,9 @@ function rvm-list {
|
|
710
720
|
|
711
721
|
}
|
712
722
|
|
713
|
-
function
|
723
|
+
function __rvm_reset {
|
714
724
|
|
715
|
-
|
725
|
+
__rvm_select "system"
|
716
726
|
|
717
727
|
PATH="$rvm_default_path" ; export PATH
|
718
728
|
for variable in RUBY_VERSION GEM_HOME MY_RUBY_HOME ; do unset $variable ; done
|
@@ -721,30 +731,30 @@ function rvm-reset {
|
|
721
731
|
|
722
732
|
}
|
723
733
|
|
724
|
-
function
|
734
|
+
function __rvm_gem-dir {
|
725
735
|
|
726
|
-
if [ -z "$rvm_selected" ] ; then
|
736
|
+
if [ -z "$rvm_selected" ] ; then __rvm_select $* ; fi
|
727
737
|
|
728
738
|
mkdir -p $rvm_gem_home
|
729
739
|
echo $rvm_gem_home
|
730
740
|
}
|
731
741
|
|
732
|
-
function
|
742
|
+
function __rvm_src-dir {
|
733
743
|
|
734
|
-
if [ -z "$rvm_selected" ] ; then
|
744
|
+
if [ -z "$rvm_selected" ] ; then __rvm_select $* ; fi
|
735
745
|
|
736
746
|
if [ "$rvm_ruby_interpreter" -a "$rvm_ruby_version" ] ; then
|
737
747
|
rvm_ruby_source_dir="$rvm_source_path/$rvm_ruby_interpreter-$rvm_ruby_version-$rvm_ruby_patch_level"
|
738
748
|
mkdir -p $rvm_ruby_source_dir
|
739
749
|
echo "$rvm_ruby_source_dir"
|
740
750
|
else
|
741
|
-
|
751
|
+
__rvm_log "fail" "No source directory exists for the default implementation."
|
742
752
|
fi
|
743
753
|
|
744
754
|
}
|
745
755
|
|
746
756
|
# clones from source implementation/version to current
|
747
|
-
function
|
757
|
+
function __rvm_gem-dup {
|
748
758
|
|
749
759
|
if [ "$1" = "default" ] ; then
|
750
760
|
rvm_source_gem_dir="$default_user_gem_path"
|
@@ -761,28 +771,28 @@ function rvm-gem-dup {
|
|
761
771
|
if [ -d $GEM_HOME/gems/$rvm_gem_name_version ] ; then
|
762
772
|
echo "$rvm_gem_name_version already installed."
|
763
773
|
else
|
764
|
-
|
774
|
+
__rvm_gi $rvm_source_gem_dir/cache/$rvm_gem_name-$rvm_gem_version.gem
|
765
775
|
fi
|
766
776
|
done
|
767
777
|
unset rvm_gem_name_version rvm_gem_name rvm_gem_version
|
768
778
|
else
|
769
|
-
|
779
|
+
__rvm_log "fail" "Unknown $rvm_ruby_interpreter version: $rvm_ruby_version"
|
770
780
|
fi
|
771
781
|
|
772
782
|
}
|
773
783
|
|
774
|
-
function
|
775
|
-
if [ -z "$rvm_selected" ] ; then
|
784
|
+
function __rvm_execute {
|
785
|
+
if [ -z "$rvm_selected" ] ; then __rvm_select $* ; fi
|
776
786
|
$rvm_ruby_home/bin/ruby $rvm_ruby_args
|
777
787
|
}
|
778
788
|
|
779
|
-
function
|
789
|
+
function __rvm_cache {
|
780
790
|
rvm_cache_file="$rvm_config_path/cache"
|
781
791
|
touch $rvm_cache_file
|
782
792
|
key="$1" ; shift
|
783
793
|
|
784
794
|
if [ -z "$key" ] ; then
|
785
|
-
|
795
|
+
__rvm_log "fail" "__rvm_cache must be called with at least one argument: __rvm_cache key [value]"
|
786
796
|
else
|
787
797
|
if [ "$key" = "unset" -o "$key" = "delete" ] ; then
|
788
798
|
sed -i~ "s/^$2=.*$//" $rvm_cache_file
|
@@ -801,16 +811,16 @@ function rvm-cache {
|
|
801
811
|
fi
|
802
812
|
}
|
803
813
|
|
804
|
-
function
|
805
|
-
unset rvm_selected rvm_action rvm_ruby_interpreter rvm_ruby_patch_level rvm_ruby_version rvm_irbrc_file rvm_ruby_irbrc rvm_source_path rvm_install_path rvm_debug rvm_prefix_path rvm_ruby_package_name rvm_gem_path rvm_command rvm_error_message IRBRC rvm_ruby_home rvm_ruby_binary rvm_gem_set_name rvm_delete_flag rvm_ruby_tag rvm_ruby_rev rvm_url rvm_ruby_make rvm_ruby_make_install rvm_config_path
|
814
|
+
function __rvm_cleanup-variables {
|
815
|
+
unset rvm_selected rvm_action rvm_ruby_interpreter rvm_ruby_patch_level rvm_ruby_version rvm_irbrc_file rvm_ruby_irbrc rvm_source_path rvm_install_path rvm_debug rvm_prefix_path rvm_ruby_package_name rvm_gem_path rvm_command rvm_error_message IRBRC rvm_ruby_home rvm_ruby_binary rvm_gem_set_name rvm_delete_flag rvm_ruby_tag rvm_ruby_rev rvm_url rvm_ruby_make rvm_ruby_make_install rvm_config_path rvm_prompt
|
806
816
|
}
|
807
817
|
|
808
|
-
function
|
818
|
+
function __rvm_get-user-defaults {
|
809
819
|
# NOW load defaults settings. TODO: root user loads /etc/rvmrc
|
810
820
|
if [ -s ~/.rvmrc ] ; then source ~/.rvmrc ; fi
|
811
821
|
}
|
812
822
|
|
813
|
-
function
|
823
|
+
function __rvm_parse-args {
|
814
824
|
while [ $# -gt 0 ] ; do
|
815
825
|
rvm_token="$1" ; shift
|
816
826
|
case "$rvm_token" in
|
@@ -824,7 +834,7 @@ function rvm-parse-args {
|
|
824
834
|
fi
|
825
835
|
;;
|
826
836
|
|
827
|
-
ruby|jruby|ree|macruby|rubinius|default|all)
|
837
|
+
ruby|jruby|ree|macruby|rbx|rubinius|default|all)
|
828
838
|
rvm_ruby_interpreter="$rvm_token"
|
829
839
|
rvm_action="${rvm_action:-use}"
|
830
840
|
;;
|
@@ -939,37 +949,22 @@ function rvm-parse-args {
|
|
939
949
|
|
940
950
|
function rvm {
|
941
951
|
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
952
|
+
__rvm_cleanup-variables
|
953
|
+
__rvm_get-user-defaults
|
954
|
+
__rvm_initialize
|
955
|
+
__rvm_set-defaults
|
956
|
+
__rvm_parse-args $*
|
947
957
|
|
948
958
|
case "$rvm_action" in
|
949
|
-
install)
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
fi
|
959
|
-
unset rvm_ruby_version
|
960
|
-
done
|
961
|
-
else
|
962
|
-
rvm-install-ruby $rvm_ruby_interpreter $rvm_ruby_version $rvm_ruby_patch_level
|
963
|
-
fi
|
964
|
-
;;
|
965
|
-
uninstall) rvm-uninstall $rvm_ruby_interpreter $rvm_ruby_version $rvm_ruby_patch_level ;;
|
966
|
-
use) rvm-use $rvm_ruby_interpreter $rvm_ruby_version $rvm_ruby_patch_level ;;
|
967
|
-
list) rvm-list ;;
|
968
|
-
gemdir) rvm-gem-dir $rvm_ruby_interpreter $rvm_ruby_version $rvm_ruby_patch_level ;;
|
969
|
-
srcdir) rvm-src-dir $rvm_ruby_interpreter $rvm_ruby_version $rvm_ruby_patch_level ;;
|
970
|
-
gemdup) rvm-gem-dup $rvm_ruby_interpreter $rvm_ruby_version $rvm_ruby_patch_level ;;
|
971
|
-
symlinks) rvm-symlinks ;;
|
972
|
-
version) rvm-version ;;
|
959
|
+
install) __rvm_install-ruby $rvm_ruby_interpreter $rvm_ruby_version $rvm_ruby_patch_level ;;
|
960
|
+
uninstall) __rvm_uninstall $rvm_ruby_interpreter $rvm_ruby_version $rvm_ruby_patch_level ;;
|
961
|
+
use) __rvm_use $rvm_ruby_interpreter $rvm_ruby_version $rvm_ruby_patch_level ;;
|
962
|
+
list) __rvm_list ;;
|
963
|
+
gemdir) __rvm_gem-dir $rvm_ruby_interpreter $rvm_ruby_version $rvm_ruby_patch_level ;;
|
964
|
+
srcdir) __rvm_src-dir $rvm_ruby_interpreter $rvm_ruby_version $rvm_ruby_patch_level ;;
|
965
|
+
gemdup) __rvm_gem-dup $rvm_ruby_interpreter $rvm_ruby_version $rvm_ruby_patch_level ;;
|
966
|
+
symlinks) __rvm_symlinks ;;
|
967
|
+
version) __rvm_version ;;
|
973
968
|
rubydo)
|
974
969
|
if [ ! -z "$rvm_ruby_version" ] ; then
|
975
970
|
rvm_ruby_versions=$(echo $rvm_ruby_version | tr ',' ' ')
|
@@ -982,7 +977,7 @@ function rvm {
|
|
982
977
|
unset rvm_ruby_version
|
983
978
|
fi
|
984
979
|
unset temp
|
985
|
-
|
980
|
+
__rvm_select $rvm_ruby_interpreter $rvm_ruby_version
|
986
981
|
|
987
982
|
rvm_command="$rvm_ruby_binary $rvm_ruby_args"
|
988
983
|
echo "$(basename $rvm_ruby_binary):"
|
@@ -1000,12 +995,12 @@ function rvm {
|
|
1000
995
|
done
|
1001
996
|
fi
|
1002
997
|
;;
|
1003
|
-
reset)
|
998
|
+
reset) __rvm_reset ;;
|
1004
999
|
# TODO: how can we use bin_path here for reload, default file?
|
1005
1000
|
reload) source ~/.rvm/scripts/rvm ;;
|
1006
|
-
error)
|
1001
|
+
error) __rvm_log "fail" "$rvm_error_message ( see: rvm usage )" ; return 1; ;;
|
1007
1002
|
info|debug)
|
1008
|
-
|
1003
|
+
__rvm_version
|
1009
1004
|
cat <<-Info
|
1010
1005
|
|
1011
1006
|
ruby:
|
@@ -1032,27 +1027,27 @@ environment:
|
|
1032
1027
|
Info
|
1033
1028
|
|
1034
1029
|
if [ "$rvm_action" = "debug" ] ; then
|
1035
|
-
|
1030
|
+
__rvm_log "info" "PATH:$(echo $PATH | awk -F":" '{print $1":"$2":"$3":"$4":"$5}')"
|
1036
1031
|
for file in .bash_profile .bashrc .zshrc ; do
|
1037
1032
|
if [ -s $file ] ; then
|
1038
|
-
|
1033
|
+
__rvm_log "debug" "~/$file:\n$(cat ~/$file | grep rvm)\n"
|
1039
1034
|
fi
|
1040
1035
|
done
|
1041
1036
|
if [ -s $rvm_install_path/current ] ; then
|
1042
|
-
|
1037
|
+
__rvm_log "debug" "$rvm_install_path/current:\n$($rvm_install_path/current)\n"
|
1043
1038
|
fi
|
1044
1039
|
if [ -e $rvm_install_path/bin/rvm ] ; then
|
1045
|
-
|
1040
|
+
__rvm_log "debug" "rvm script in bin:\n$(ls -laht $rvm_install_path/bin/rvm)"
|
1046
1041
|
fi
|
1047
1042
|
fi
|
1048
1043
|
return 0
|
1049
1044
|
;;
|
1050
|
-
usage|help)
|
1045
|
+
usage|help) __rvm_usage ;;
|
1051
1046
|
*)
|
1052
1047
|
if [ ! -z "$rvm_action" ] ; then
|
1053
|
-
|
1048
|
+
__rvm_log "fail" "unknown action '$rvm_action'"
|
1054
1049
|
else
|
1055
|
-
|
1050
|
+
__rvm_usage
|
1056
1051
|
fi
|
1057
1052
|
return 1
|
1058
1053
|
esac
|
data/scripts/rvm-install
CHANGED
@@ -8,10 +8,13 @@ fi
|
|
8
8
|
|
9
9
|
info="\n\033[0;32m<i>\033[0m"
|
10
10
|
question="\n\033[0;32m<?>\033[0m"
|
11
|
-
|
12
|
-
echo -e "Installing rvm source to ~/.rvm/scripts/rvm..."
|
13
11
|
cwd=$(pwd)
|
12
|
+
source_dir="${source_dir:-`dirname $0 | xargs dirname`}"
|
13
|
+
if [ ! -d "$source_dir" ] ; then unset source_dir ; fi
|
14
|
+
source_dir="${source_dir:-$cwd}"
|
14
15
|
rvm_dir=~/.rvm
|
16
|
+
|
17
|
+
echo -e "Installing rvm source to ~/.rvm/scripts/rvm..."
|
15
18
|
mkdir -p $rvm_dir
|
16
19
|
|
17
20
|
for dir in src scripts bin log archives config gems examples ; do
|
@@ -32,8 +35,8 @@ fi
|
|
32
35
|
|
33
36
|
for dir in scripts examples ; do
|
34
37
|
mkdir -p $rvm_dir/$dir
|
35
|
-
for file in `/bin/ls $dir/`; do
|
36
|
-
cp $
|
38
|
+
for file in `/bin/ls $source_dir/$dir/`; do
|
39
|
+
cp $source_dir/$dir/$file $rvm_dir/$dir/$file
|
37
40
|
done
|
38
41
|
done
|
39
42
|
|
data/scripts/rvm-update
CHANGED
@@ -6,6 +6,9 @@ if [ "$user" = "root" ] ; then
|
|
6
6
|
exit 1
|
7
7
|
fi
|
8
8
|
cwd=$(pwd)
|
9
|
+
source_dir="${source_dir:-`dirname $0 | xargs dirname`}"
|
10
|
+
if [ ! -d "$source_dir" ] ; then unset source_dir ; fi
|
11
|
+
source_dir="${source_dir:-$cwd}"
|
9
12
|
rvm_dir=~/.rvm
|
10
13
|
|
11
14
|
info="\n\033[0;32m<i>\033[0m"
|
@@ -29,8 +32,8 @@ fi
|
|
29
32
|
|
30
33
|
for dir in scripts examples ; do
|
31
34
|
mkdir -p $rvm_dir/$dir
|
32
|
-
for file in `/bin/ls $dir/`; do
|
33
|
-
cp $
|
35
|
+
for file in `/bin/ls $source_dir/$dir/`; do
|
36
|
+
cp $source_dir/$dir/$file $rvm_dir/$dir/$file
|
34
37
|
done
|
35
38
|
done
|
36
39
|
|
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.26
|
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-08-
|
12
|
+
date: 2009-08-31 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|