rvm 0.1.40 → 0.1.41
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/binscripts/rvm-prompt +1 -1
- data/binscripts/rvm-update-head +3 -1
- data/binscripts/rvm-update-latest +3 -1
- data/config/db +6 -6
- data/config/known +6 -4
- data/config/md5 +8 -4
- data/install +20 -3
- data/lib/VERSION.yml +1 -1
- data/rvm.gemspec +5 -2
- data/scripts/cd +1 -0
- data/scripts/cli +14 -12
- data/scripts/gemsets +3 -3
- data/scripts/info +1 -1
- data/scripts/initialize +5 -1
- data/scripts/install +20 -3
- data/scripts/list +15 -7
- data/scripts/manage +80 -38
- data/scripts/manpages +8 -0
- data/scripts/patches +38 -0
- data/scripts/patchsets +47 -0
- data/scripts/rubygems +1 -1
- data/scripts/rvm +1 -0
- data/scripts/rvm-install +20 -3
- data/scripts/selector +1 -4
- data/scripts/update +20 -3
- data/scripts/utility +18 -5
- data/scripts/wrapper +2 -2
- metadata +7 -4
data/binscripts/rvm-prompt
CHANGED
@@ -87,7 +87,7 @@ if [[ ! -z "$ruby" ]] && [[ ! -z "$(echo "$ruby" | awk '/rvm/{print}')" ]] ; the
|
|
87
87
|
|
88
88
|
command="prompt=\"$format\""
|
89
89
|
eval "$command"
|
90
|
-
echo "$prompt" | sed -e 's
|
90
|
+
echo "$prompt" | sed -e 's#^[[:space:]]*-*##g' -e 's#--*#-#g' -e 's#-*[[:space:]]*$##' -e 's#-'${rvm_gemset_separator}'#'${rvm_gemset_separator}'#'
|
91
91
|
|
92
92
|
else
|
93
93
|
while [[ $# -gt 0 ]] ; do
|
data/binscripts/rvm-update-head
CHANGED
@@ -7,5 +7,7 @@ cd $rvm_path/src
|
|
7
7
|
|
8
8
|
rm -rf ./rvm/ && git clone --depth 1 git://github.com/wayneeseguin/rvm.git
|
9
9
|
cd rvm
|
10
|
-
|
10
|
+
# v v v This is a godo idea however it does not preserve the executible bit.
|
11
|
+
# Needs more thought, perhaps a simple sed instead.
|
12
|
+
# dos2unix scripts/* >/dev/null 2>&1
|
11
13
|
bash scripts/install
|
@@ -16,6 +16,8 @@ tar zxf "rvm-${stable_version}.tar.gz"
|
|
16
16
|
|
17
17
|
cd "rvm-${stable_version}"
|
18
18
|
|
19
|
-
|
19
|
+
# v v v This is a godo idea however it does not preserve the executible bit.
|
20
|
+
# Needs more thought, perhaps a simple sed instead.
|
21
|
+
#dos2unix scripts/* >/dev/null 2>&1
|
20
22
|
|
21
23
|
bash scripts/install
|
data/config/db
CHANGED
@@ -4,7 +4,7 @@ niceness=0
|
|
4
4
|
interpreter=ruby
|
5
5
|
ruby_version=1.8.7
|
6
6
|
ruby_configure_flags=--enable-shared
|
7
|
-
ruby_patchlevel=
|
7
|
+
ruby_patchlevel=299
|
8
8
|
ruby_configure=--enable-shared
|
9
9
|
ruby_repo_url=http://svn.ruby-lang.org/repos/ruby
|
10
10
|
ruby_1.0_url=ftp://ftp.ruby-lang.org/pub/ruby/1.0
|
@@ -18,10 +18,10 @@ ruby_1.8_url=ftp://ftp.ruby-lang.org/pub/ruby/1.8
|
|
18
18
|
ruby_1.9_url=ftp://ftp.ruby-lang.org/pub/ruby/1.9
|
19
19
|
ruby_2.0_url=ftp://ftp.ruby-lang.org/pub/ruby/2.0
|
20
20
|
ruby_1.9.1_patch_level=378
|
21
|
-
ruby_1.9.2_patch_level=
|
21
|
+
ruby_1.9.2_patch_level=rc1
|
22
22
|
ruby_1.8.5_patch_level=231
|
23
23
|
ruby_1.8.6_patch_level=399
|
24
|
-
ruby_1.8.7_patch_level=
|
24
|
+
ruby_1.8.7_patch_level=299
|
25
25
|
rubygems_version=1.3.7
|
26
26
|
rubygems_1.3.5_url=http://rubyforge.org/frs/download.php/60718
|
27
27
|
rubygems_1.3.6_url=http://rubyforge.org/frs/download.php/69365
|
@@ -46,7 +46,7 @@ macruby_version=0.6
|
|
46
46
|
macruby_url=http://www.macruby.org/files
|
47
47
|
macruby_repo_url=git://git.macruby.org/macruby/MacRuby.git
|
48
48
|
macruby_nightly_url=http://www.macruby.org/files/nightlies/macruby_nightly-latest.pkg
|
49
|
-
maglev_version=
|
49
|
+
maglev_version=23767
|
50
50
|
maglev_url=http://glass-downloads.gemstone.com/maglev
|
51
51
|
maglev_repo_url=git://github.com/MagLev/maglev.git
|
52
52
|
shyouhei_repo_url=git://github.com/shyouhei/ruby.git
|
@@ -55,13 +55,13 @@ ironruby_repo_url=git://github.com/ironruby/ironruby.git
|
|
55
55
|
ironruby_1.0_url=http://rubyforge.org/frs/download.php/70179/
|
56
56
|
# Packages
|
57
57
|
readline_url=ftp://ftp.gnu.org/gnu/readline
|
58
|
-
|
58
|
+
libiconv_url=http://ftp.gnu.org/pub/gnu/libiconv
|
59
59
|
curl_url=http://curl.haxx.se/download
|
60
60
|
openssl_url=http://www.openssl.org/source
|
61
61
|
zlib_url=http://www.zlib.net
|
62
62
|
autoconf_url=ftp.gnu.org/gnu/autoconf
|
63
63
|
ncurses_url=http://ftp.gnu.org/pub/gnu/ncurses
|
64
|
-
|
64
|
+
pkg-config_url=http://pkgconfig.freedesktop.org/releases
|
65
65
|
gettext_url=ftp://ftp.gnu.org/pub/gnu/gettext
|
66
66
|
libxml2_url=ftp://xmlsoft.org/libxml2/
|
67
67
|
glib_url=http://ftp.gnome.org/pub/gnome/sources/glib/2.23
|
data/config/known
CHANGED
@@ -1,13 +1,15 @@
|
|
1
1
|
# MRI Rubies
|
2
2
|
(ruby-)1.8.6(-p399)
|
3
3
|
(ruby-)1.8.6-head
|
4
|
-
(ruby-)1.8.7(-
|
4
|
+
(ruby-)1.8.7(-p299)
|
5
5
|
(ruby-)1.8.7-head
|
6
|
-
(ruby-)1.9.1
|
7
|
-
(ruby-)1.9.1
|
6
|
+
(ruby-)1.9.1-p243
|
7
|
+
(ruby-)1.9.1-p376
|
8
|
+
(ruby-)1.9.1(-p429)
|
8
9
|
(ruby-)1.9.1-head
|
9
10
|
(ruby-)1.9.2-preview1
|
10
11
|
(ruby-)1.9.2-preview3
|
12
|
+
(ruby-)1.9.2(-rc1)
|
11
13
|
(ruby-)1.9.2-head
|
12
14
|
ruby-head
|
13
15
|
|
@@ -29,7 +31,7 @@ ree-1.8.6-head
|
|
29
31
|
ree-1.8.7-head
|
30
32
|
|
31
33
|
# MagLev
|
32
|
-
maglev(-
|
34
|
+
maglev(-23767)
|
33
35
|
maglev-head
|
34
36
|
|
35
37
|
# Shyouhei head, the default mput
|
data/config/md5
CHANGED
@@ -15,13 +15,16 @@ ruby-1.8.7-p160.tar.gz=945398f97e2de6dd8ab6df68d10bb1a1
|
|
15
15
|
ruby-1.8.7-p174.tar.gz=18dcdfef761a745ac7da45b61776afa5
|
16
16
|
ruby-1.8.7-p248.tar.gz=60a65374689ac8b90be54ca9c61c48e3
|
17
17
|
ruby-1.8.7-p249.tar.gz=d7db7763cffad279952eb7e9bbfc221c
|
18
|
+
ruby-1.8.7-p299.tar.gz=43533980ee0ea57381040d4135cf9677
|
18
19
|
ruby-1.9.1-p129.tar.gz=c71f413514ee6341c627be2957023a5c
|
19
20
|
ruby-1.9.1-p243.tar.gz=515bfd965814e718c0943abf3dde5494
|
20
21
|
ruby-1.9.1-p376.tar.gz=ebb20550a11e7f1a2fbd6fdec2a3e0a3
|
21
22
|
ruby-1.9.1-p376.tar.gz=ebb20550a11e7f1a2fbd6fdec2a3e0a3
|
22
23
|
ruby-1.9.1-p378.tar.gz=9fc5941bda150ac0a33b299e1e53654c
|
24
|
+
ruby-1.9.1-p429.tar.gz=0f6d7630f26042e00bc59875755cf879
|
23
25
|
ruby-1.9.2-preview1.tar.gz=e2b8cdbf300f53472be09699a5837fd1
|
24
26
|
ruby-1.9.2-preview3.tar.gz=209e59f3495a5503fa948c2732f1d705
|
27
|
+
ruby-1.9.2-rc1.tar.gz=fdedd5b42ae89a9a46797823ad2d9acf
|
25
28
|
ruby-enterprise-1.8.6-20090610.tar.gz=0bf66ee626918464a6eccdd83c99d63a
|
26
29
|
ruby-enterprise-1.8.7-2009.10.tar.gz=3727eef7b6b1b2f31db7d091328d966e
|
27
30
|
ruby-enterprise-1.8.7-20090928.tar.gz=ae00018ce89d95419dfde370fcd485ac
|
@@ -45,7 +48,8 @@ zlib-1.2.3.tar.gz=debc62758716a169df9f62e6ab2bc634
|
|
45
48
|
curl-7.19.7.tar.gz=ecb2e37e45c9933e2a963cabe03670ab
|
46
49
|
pkg-config-0.23.tar.gz=d922a88782b64441d06547632fd85744
|
47
50
|
ironruby-1.0.zip=7a92888837b3507355ed391dbfc0ab83
|
48
|
-
GemStone-
|
49
|
-
GemStone-
|
50
|
-
MagLev-
|
51
|
-
MagLev-
|
51
|
+
GemStone-23767.Darwin-i386.tar.gz=639ca12a261e8626ff8cf63bd408b253
|
52
|
+
GemStone-23767.Linux-x86_64.tar.gz=79ee9214a2df3427584a2b9b13437ddd
|
53
|
+
MagLev-23767.Darwin-i386.tar.gz=e4eae8ef9f1c9264d00b90899e3896ca
|
54
|
+
MagLev-23767.Linux-x86_64.tar.gz=d42bc9fdfb704e5723310352959e17cc
|
55
|
+
|
data/install
CHANGED
@@ -124,7 +124,7 @@ done
|
|
124
124
|
#
|
125
125
|
# Scripts
|
126
126
|
#
|
127
|
-
for dir_name in config scripts examples lib hooks help ; do
|
127
|
+
for dir_name in config scripts examples lib hooks help patches; do
|
128
128
|
spinner
|
129
129
|
mkdir -p "$rvm_path/$dir_name"
|
130
130
|
if [[ -d "$source_path/$dir_name" ]] ; then
|
@@ -184,7 +184,7 @@ fi
|
|
184
184
|
#
|
185
185
|
spinner
|
186
186
|
mkdir -p "$rvm_gemsets_path"
|
187
|
-
for gemset_file in $(cd gemsets ; find . -iname '*.gems' | sed 's
|
187
|
+
for gemset_file in $(cd gemsets ; find . -iname '*.gems' | sed 's/^\.\///') ; do
|
188
188
|
source_path="$(pwd)/gemsets"
|
189
189
|
destination="$rvm_gemsets_path/$gemset_file"
|
190
190
|
destination_path="$(dirname "$destination")"
|
@@ -192,7 +192,20 @@ for gemset_file in $(cd gemsets ; find . -iname '*.gems' | sed 's/\.\///') ; do
|
|
192
192
|
mkdir -p "$destination_path"
|
193
193
|
cp "$source_path/$gemset_file" "$destination"
|
194
194
|
fi
|
195
|
-
done ; unset destination destination_path source_path
|
195
|
+
done ; unset destination destination_path source_path gemset_file
|
196
|
+
|
197
|
+
spinner
|
198
|
+
mkdir -p "$rvm_patchsets_path"
|
199
|
+
for patchsets_file in $(cd gemsets ; find . -iname '*' | sed 's/^\.\///') ; do
|
200
|
+
source_path="$(pwd)/gemsets"
|
201
|
+
destination="$rvm_patchsets_path/$patchset_file"
|
202
|
+
destination_path="$(dirname "$destination")"
|
203
|
+
if [[ ! -s "$destination" ]] ; then
|
204
|
+
mkdir -p "$destination_path"
|
205
|
+
cp "$source_path/$patchset_file" "$destination"
|
206
|
+
fi
|
207
|
+
done ; unset destination destination_path source_path patchset_file
|
208
|
+
|
196
209
|
|
197
210
|
#
|
198
211
|
# Migrate ~/.rvm/ruby-X,jruby-X,... to ~/.rvm/rubies/ for 0.1.0.
|
@@ -266,6 +279,10 @@ if [[ "root" = "$(whoami)" ]] ; then
|
|
266
279
|
mkdir -p $rvm_bin_path
|
267
280
|
chmod +x $rvm_bin_path/rvm
|
268
281
|
chmod +x $rvm_bin_path/rvmsudo
|
282
|
+
printf "\n Copying manpages into place."
|
283
|
+
for man_file in $(\ls "$install_source_path/man"); do
|
284
|
+
cp -f "$install_source_path/man/$man_file" "$rvm_man_path/$man_file"
|
285
|
+
done
|
269
286
|
fi
|
270
287
|
|
271
288
|
if [[ "$upgrade_flag" -eq 0 ]] ; then
|
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.1.
|
8
|
+
s.version = "0.1.41"
|
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-
|
12
|
+
s.date = %q{2010-07-08}
|
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}
|
@@ -92,11 +92,14 @@ Gem::Specification.new do |s|
|
|
92
92
|
"scripts/log",
|
93
93
|
"scripts/maglev",
|
94
94
|
"scripts/manage",
|
95
|
+
"scripts/manpages",
|
95
96
|
"scripts/match",
|
96
97
|
"scripts/md5",
|
97
98
|
"scripts/monitor",
|
98
99
|
"scripts/notes",
|
99
100
|
"scripts/package",
|
101
|
+
"scripts/patches",
|
102
|
+
"scripts/patchsets",
|
100
103
|
"scripts/rubygems",
|
101
104
|
"scripts/rvm",
|
102
105
|
"scripts/rvm-install",
|
data/scripts/cd
CHANGED
data/scripts/cli
CHANGED
@@ -1,6 +1,14 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
3
|
__rvm_usage() { cat "${rvm_path:-$HOME/.rvm}/README" | ${PAGER:-less} ; }
|
4
|
+
# alternate usage impl: uses man page
|
5
|
+
#__rvm_usage() {
|
6
|
+
#if [[ `which man` ]]; then
|
7
|
+
#man 1 rvm ; }
|
8
|
+
#else
|
9
|
+
#cat "${rvm_path:-$HOME/.rvm}/README" | ${PAGER:-less}
|
10
|
+
#fi
|
11
|
+
#}
|
4
12
|
|
5
13
|
__rvm_parse_args() {
|
6
14
|
|
@@ -207,15 +215,9 @@ __rvm_parse_args() {
|
|
207
215
|
fi
|
208
216
|
;;
|
209
217
|
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
if [[ -z "$rvm_ruby_patch" ]] ; then
|
214
|
-
rvm_ruby_patch="$1"
|
215
|
-
else
|
216
|
-
rvm_ruby_patch="$rvm_ruby_patch,$1";
|
217
|
-
fi ; shift
|
218
|
-
rvm_action="${rvm_action:-use}"
|
218
|
+
--patches|--patch)
|
219
|
+
rvm_patch_names="$1 $rvm_patch_names"; shift
|
220
|
+
rvm_patch_original_pwd="$PWD"
|
219
221
|
;;
|
220
222
|
|
221
223
|
--head) rvm_head_flag=1 ;;
|
@@ -328,7 +330,7 @@ __rvm_parse_args() {
|
|
328
330
|
|
329
331
|
-C|--configure)
|
330
332
|
if [[ ! -z "$1" ]] ; then
|
331
|
-
rvm_ruby_configure_flags="$(echo $1 |
|
333
|
+
rvm_ruby_configure_flags="$(echo $1 | sed -e 's#,--# --#g')"
|
332
334
|
shift
|
333
335
|
else
|
334
336
|
rvm_action="error"
|
@@ -450,8 +452,8 @@ rvm() {
|
|
450
452
|
__rvm_initialize
|
451
453
|
__rvm_parse_args "$@"
|
452
454
|
|
453
|
-
export BUNDLE_PATH GEM_HOME GEM_PATH rvm_ruby_string rvm_action rvm_bin_flag rvm_debug_flag rvm_delete_flag rvm_docs_type rvm_file_name rvm_gemset_name rvm_head_flag rvm_install_on_use_flag rvm_interactive rvm_llvm_flag rvm_make_flags rvm_proxy rvm_remove_flag rvm_ruby_args rvm_ruby_configure_flags rvm_ruby_file rvm_ruby_gem_home rvm_ruby_interpreter rvm_ruby_name
|
454
|
-
export rvm_path rvm_rubies_path rvm_scripts_path rvm_archives_path rvm_src_path rvm_log_path rvm_bin_path rvm_gems_path rvm_config_path rvm_tmp_path rvm_hooks_path rvm_gems_cache_path rvm_gemset_separator
|
455
|
+
export BUNDLE_PATH GEM_HOME GEM_PATH rvm_ruby_string rvm_action rvm_bin_flag rvm_debug_flag rvm_delete_flag rvm_docs_type rvm_file_name rvm_gemset_name rvm_head_flag rvm_install_on_use_flag rvm_interactive rvm_llvm_flag rvm_make_flags rvm_proxy rvm_remove_flag rvm_ruby_args rvm_ruby_configure_flags rvm_ruby_file rvm_ruby_gem_home rvm_ruby_interpreter rvm_ruby_name rvm_ruby_version rvm_system_flag rvm_trace_flag rvm_use_flag rvm_user_flag rvm_verbose_flag rvm_patch_names rvm_patch_original_pwd
|
456
|
+
export rvm_path rvm_rubies_path rvm_scripts_path rvm_archives_path rvm_src_path rvm_patches_path rvm_patches_path rvm_patchsets_path rvm_log_path rvm_bin_path rvm_gems_path rvm_config_path rvm_tmp_path rvm_hooks_path rvm_gems_cache_path rvm_gemset_separator
|
455
457
|
|
456
458
|
result=0
|
457
459
|
case "$rvm_action" in
|
data/scripts/gemsets
CHANGED
@@ -393,8 +393,8 @@ gemset_pristine() {
|
|
393
393
|
gemset_initial() {
|
394
394
|
$rvm_scripts_path/log "info" "Importing initial gemsets for $(__rvm_environment_identifier)."
|
395
395
|
mkdir -p "$rvm_gemsets_path/$(echo "$rvm_ruby_string" | tr '-' '/')" 2>/dev/null
|
396
|
-
for gemsets_path in
|
397
|
-
if [[
|
396
|
+
for gemsets_path in $(__rvm_ruby_string_paths_under "$rvm_gemsets_path") ; do
|
397
|
+
if [[ -n "$rvm_gemset_name" ]] ; then
|
398
398
|
if [[ -s "${gemsets_path}/${rvm_gemset_name}.gems" ]] ; then
|
399
399
|
(source "$rvm_scripts_path/rvm"; rvm gemset import "${gemsets_path}/${rvm_gemset_name}.gems") > /dev/null
|
400
400
|
fi
|
@@ -418,7 +418,7 @@ if ! command -v gem > /dev/null ; then
|
|
418
418
|
fi
|
419
419
|
|
420
420
|
action="$(echo $* | awk '{print $1}')"
|
421
|
-
gems_args
|
421
|
+
gems_args="$(echo "$*" | awk '{$1="" ; print}' | __rvm_strip)"
|
422
422
|
export rvm_gemset_name
|
423
423
|
|
424
424
|
if [[ "import" = "$action" ]] || [[ "load" = "$action" ]] ; then
|
data/scripts/info
CHANGED
@@ -22,7 +22,7 @@ info_system() {
|
|
22
22
|
|
23
23
|
info_rvm() {
|
24
24
|
rvm_info="$rvm_info\n rvm:"
|
25
|
-
rvm_info="$rvm_info\n version: \"$(__rvm_version | tr "\n" ' ' |
|
25
|
+
rvm_info="$rvm_info\n version: \"$(__rvm_version | tr "\n" ' ' | __rvm_strip)\""
|
26
26
|
rvm_info="$rvm_info\n"
|
27
27
|
}
|
28
28
|
|
data/scripts/initialize
CHANGED
@@ -13,7 +13,9 @@ rvm_project_rvmrc_default="${rvm_project_rvmrc_default:-0}"
|
|
13
13
|
|
14
14
|
if [[ "root" = "$(whoami)" ]] ; then
|
15
15
|
rvm_bin_path="${rvm_bin_path:-"/usr/local/bin"}"
|
16
|
+
rvm_man_path="${rvm_man_path:-"/usr/local/share/man"}"
|
16
17
|
else
|
18
|
+
rvm_man_path="${rvm_man_path:-"$rvm_path/man"}"
|
17
19
|
rvm_bin_path="${rvm_bin_path:-"$rvm_path/bin"}"
|
18
20
|
fi
|
19
21
|
|
@@ -32,7 +34,9 @@ rvm_wrappers_path="${rvm_wrappers_path:-"$rvm_path/wrappers"}"
|
|
32
34
|
rvm_hooks_path="${rvm_hooks_path:-"$rvm_path/hooks"}"
|
33
35
|
rvm_tmp_path="${rvm_tmp_path:-"$rvm_path/tmp"}"
|
34
36
|
rvm_usr_path="${rvm_usr_path:-"$rvm_path/usr"}"
|
37
|
+
rvm_patches_path="${rvm_patches_path:-"$rvm_path/patches"}"
|
38
|
+
rvm_patchsets_path="${rvm_patchsets_path:-"$rvm_path/patchsets"}"
|
35
39
|
rvm_gemset_separator="${rvm_gemset_separator:-"@"}"
|
36
40
|
|
37
|
-
export rvm_path rvm_rubies_path rvm_scripts_path rvm_archives_path rvm_src_path rvm_log_path rvm_bin_path rvm_gems_path rvm_config_path rvm_tmp_path rvm_hooks_path rvm_gems_cache_path rvm_gemset_separator rvm_gemsets_path rvm_repo_path
|
41
|
+
export rvm_path rvm_patches_path rvm_rubies_path rvm_scripts_path rvm_archives_path rvm_src_path rvm_log_path rvm_bin_path rvm_gems_path rvm_config_path rvm_tmp_path rvm_hooks_path rvm_gems_cache_path rvm_gemset_separator rvm_gemsets_path rvm_repo_path rvm_patchsets_path
|
38
42
|
|
data/scripts/install
CHANGED
@@ -124,7 +124,7 @@ done
|
|
124
124
|
#
|
125
125
|
# Scripts
|
126
126
|
#
|
127
|
-
for dir_name in config scripts examples lib hooks help ; do
|
127
|
+
for dir_name in config scripts examples lib hooks help patches; do
|
128
128
|
spinner
|
129
129
|
mkdir -p "$rvm_path/$dir_name"
|
130
130
|
if [[ -d "$source_path/$dir_name" ]] ; then
|
@@ -184,7 +184,7 @@ fi
|
|
184
184
|
#
|
185
185
|
spinner
|
186
186
|
mkdir -p "$rvm_gemsets_path"
|
187
|
-
for gemset_file in $(cd gemsets ; find . -iname '*.gems' | sed 's
|
187
|
+
for gemset_file in $(cd gemsets ; find . -iname '*.gems' | sed 's/^\.\///') ; do
|
188
188
|
source_path="$(pwd)/gemsets"
|
189
189
|
destination="$rvm_gemsets_path/$gemset_file"
|
190
190
|
destination_path="$(dirname "$destination")"
|
@@ -192,7 +192,20 @@ for gemset_file in $(cd gemsets ; find . -iname '*.gems' | sed 's/\.\///') ; do
|
|
192
192
|
mkdir -p "$destination_path"
|
193
193
|
cp "$source_path/$gemset_file" "$destination"
|
194
194
|
fi
|
195
|
-
done ; unset destination destination_path source_path
|
195
|
+
done ; unset destination destination_path source_path gemset_file
|
196
|
+
|
197
|
+
spinner
|
198
|
+
mkdir -p "$rvm_patchsets_path"
|
199
|
+
for patchsets_file in $(cd gemsets ; find . -iname '*' | sed 's/^\.\///') ; do
|
200
|
+
source_path="$(pwd)/gemsets"
|
201
|
+
destination="$rvm_patchsets_path/$patchset_file"
|
202
|
+
destination_path="$(dirname "$destination")"
|
203
|
+
if [[ ! -s "$destination" ]] ; then
|
204
|
+
mkdir -p "$destination_path"
|
205
|
+
cp "$source_path/$patchset_file" "$destination"
|
206
|
+
fi
|
207
|
+
done ; unset destination destination_path source_path patchset_file
|
208
|
+
|
196
209
|
|
197
210
|
#
|
198
211
|
# Migrate ~/.rvm/ruby-X,jruby-X,... to ~/.rvm/rubies/ for 0.1.0.
|
@@ -266,6 +279,10 @@ if [[ "root" = "$(whoami)" ]] ; then
|
|
266
279
|
mkdir -p $rvm_bin_path
|
267
280
|
chmod +x $rvm_bin_path/rvm
|
268
281
|
chmod +x $rvm_bin_path/rvmsudo
|
282
|
+
printf "\n Copying manpages into place."
|
283
|
+
for man_file in $(\ls "$install_source_path/man"); do
|
284
|
+
cp -f "$install_source_path/man/$man_file" "$rvm_man_path/$man_file"
|
285
|
+
done
|
269
286
|
fi
|
270
287
|
|
271
288
|
if [[ "$upgrade_flag" -eq 0 ]] ; then
|
data/scripts/list
CHANGED
@@ -2,12 +2,6 @@
|
|
2
2
|
|
3
3
|
if [[ "$rvm_trace_flag" -eq 2 ]] ; then set -x ; export rvm_trace_flag ; fi
|
4
4
|
|
5
|
-
# Query for valid rvm ruby strings
|
6
|
-
# This is meant to be used with scripting.
|
7
|
-
list_strings() {
|
8
|
-
echo $(\ls $rvm_rubies_path)
|
9
|
-
}
|
10
|
-
|
11
5
|
list_gemsets() {
|
12
6
|
echo
|
13
7
|
ruby=$(command -v ruby) ; current_ruby=""
|
@@ -74,6 +68,17 @@ list_ruby_svn_tags() {
|
|
74
68
|
done < <(svn list http://svn.ruby-lang.org/repos/ruby/tags/ | awk '/^v1_[8|9]/')
|
75
69
|
}
|
76
70
|
|
71
|
+
# Query for valid rvm ruby strings
|
72
|
+
# This is meant to be used with scripting.
|
73
|
+
list_strings() {
|
74
|
+
echo $(\ls $rvm_rubies_path)
|
75
|
+
}
|
76
|
+
|
77
|
+
# This is meant to be used with scripting.
|
78
|
+
list_known_strings() {
|
79
|
+
cat "$rvm_config_path/known" | sed -e 's/#.*$//g' -e 's/(//g' -e 's/)//g' | sort -r | uniq
|
80
|
+
}
|
81
|
+
|
77
82
|
list_known() {
|
78
83
|
if [[ -z "$rvm_interactive" ]] || [[ -z "$TERM" ]] || [[ "unknown" = "$TERM" ]] ; then
|
79
84
|
cat "$rvm_config_path/known"
|
@@ -82,6 +87,7 @@ list_known() {
|
|
82
87
|
fi
|
83
88
|
}
|
84
89
|
|
90
|
+
|
85
91
|
list_rubies() {
|
86
92
|
echo
|
87
93
|
ruby=$(command -v ruby) ; current_ruby=""
|
@@ -128,6 +134,8 @@ action="$(echo "$1" | awk '{print $1}')"
|
|
128
134
|
|
129
135
|
if [[ "known" = "$action" ]] ; then
|
130
136
|
list_known
|
137
|
+
elif [[ "known_strings" = "$action" ]] ; then
|
138
|
+
list_known_strings
|
131
139
|
elif [[ "gemsets" = "$action" ]] ; then
|
132
140
|
list_gemsets
|
133
141
|
elif [[ "default" = "$action" ]] ; then
|
@@ -139,7 +147,7 @@ elif [[ "strings" = "$action" ]] ; then
|
|
139
147
|
elif [[ "ruby_svn_tags" = "$action" ]] ; then
|
140
148
|
list_ruby_svn_tags
|
141
149
|
else # help
|
142
|
-
printf "\nUsage: rvm list {known,gemsets,default,rubies,strings}"
|
150
|
+
printf "\nUsage: rvm list {known,gemsets,default,rubies,strings,known_strings}"
|
143
151
|
fi
|
144
152
|
|
145
153
|
exit $?
|
data/scripts/manage
CHANGED
@@ -4,6 +4,7 @@ original_ruby_version=$rvm_ruby_version
|
|
4
4
|
original_ruby_string=$rvm_ruby_string
|
5
5
|
|
6
6
|
source "$rvm_scripts_path/base"
|
7
|
+
source "$rvm_scripts_path/patches"
|
7
8
|
|
8
9
|
# Checks for bison, returns zero iff it is found
|
9
10
|
__rvm_check_for_bison() {
|
@@ -15,6 +16,45 @@ __rvm_check_for_bison() {
|
|
15
16
|
fi
|
16
17
|
}
|
17
18
|
|
19
|
+
# Returns a number of patches, each on a new name
|
20
|
+
# Expands patchsets etc.
|
21
|
+
__rvm_current_patch_names() {
|
22
|
+
# TODO: Lookup default patches on rvm_ruby_string heirarchy.
|
23
|
+
local patches="$rvm_patch_names default"
|
24
|
+
for patch_name in $(echo "$patches" | tr ',' ' ' | __rvm_strip); do
|
25
|
+
__rvm_expand_patch_name "$patch_name"
|
26
|
+
done
|
27
|
+
}
|
28
|
+
|
29
|
+
__rvm_apply_patches() {
|
30
|
+
local patch_result=0
|
31
|
+
local patch_level_seperator="%"
|
32
|
+
local patch_fuzziness="25"
|
33
|
+
source_directory="${1:-"$rvm_ruby_src_path"}"
|
34
|
+
__rvm_pushpop "$source_directory"
|
35
|
+
unset source_directory
|
36
|
+
for patch_name in $(__rvm_current_patch_names | __rvm_strip); do
|
37
|
+
patch_level="1"
|
38
|
+
# If set, extract the patch level from the patch name.
|
39
|
+
if echo "$patch_name" | grep -q "$patch_level_seperator"; then
|
40
|
+
patch_level="$(echo "$patch_name" | awk -F"$patch_level_seperator" '{print $2}')"
|
41
|
+
patch_name="$(echo "$patch_name" | awk -F"$patch_level_seperator" '{print $1}')"
|
42
|
+
fi
|
43
|
+
full_patch_path="$(__rvm_lookup_full_patch_path "$patch_name")"
|
44
|
+
# Expand paths, and for those we found we then apply the patches.
|
45
|
+
if [[ -n "$full_patch_path" ]]; then
|
46
|
+
__rvm_run "patch.apply.$(basename "$patch_name")" "patch -F$patch_fuzziness -p$patch_level -f < '$full_patch_path'" "Applying patch '$patch_name' (located at $full_patch_path)"
|
47
|
+
# Detect failed patches
|
48
|
+
[[ "$?" -gt 0 ]] && patch_result=1
|
49
|
+
else
|
50
|
+
$rvm_scripts_path/log "warn" "Patch '$patch_name' not found."
|
51
|
+
patch_result=1
|
52
|
+
fi
|
53
|
+
done; unset patch_name full_patch_path patch_level
|
54
|
+
__rvm_pushpop
|
55
|
+
return $patch_result
|
56
|
+
}
|
57
|
+
|
18
58
|
__rvm_install_source() {
|
19
59
|
if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select ; fi
|
20
60
|
|
@@ -29,12 +69,20 @@ __rvm_install_source() {
|
|
29
69
|
fi
|
30
70
|
|
31
71
|
builtin cd $rvm_ruby_src_path
|
72
|
+
|
32
73
|
result=$? ; if [[ "$result" -gt 0 ]] ; then
|
33
74
|
$rvm_scripts_path/log "error" "There has been an error, source directory is missing. Did the download or extraction fail? Aborting the installation." ; __rvm_pushpop ; return $result
|
34
75
|
fi
|
35
76
|
|
36
77
|
if [[ -d "${rvm_path}/usr" ]] ; then export PATH="${rvm_path}/usr/bin:${PATH}" ; fi
|
37
78
|
|
79
|
+
__rvm_apply_patches
|
80
|
+
result="$?"
|
81
|
+
if [[ "$result" -gt 0 ]]; then
|
82
|
+
$rvm_scripts_path/log "fail" "There has been an error applying the specified patches. Aborting the installation."
|
83
|
+
return $result
|
84
|
+
fi
|
85
|
+
|
38
86
|
if [[ -z "$rvm_ruby_configure" ]] && [[ ! -s "$rvm_ruby_src_path/configure" ]] ; then
|
39
87
|
if command -v autoconf > /dev/null ; then
|
40
88
|
__rvm_run "autoconf" "autoconf" "Running autoconf"
|
@@ -61,29 +109,8 @@ __rvm_install_source() {
|
|
61
109
|
$rvm_scripts_path/log "error" "Skipping configure step, 'configure' does not exist, did autoconf not run successfully?"
|
62
110
|
fi
|
63
111
|
|
64
|
-
if [[ ! -z "$rvm_ruby_patch" ]] ; then
|
65
|
-
for patch in $(echo $rvm_ruby_patch | tr ',' ' ') ; do
|
66
|
-
# detecting patch prefix (see '-p' option desc for 'patch')
|
67
|
-
# patch prefix is separated from patch path with '%' symbol
|
68
|
-
patch_prefix_separator='%'
|
69
|
-
# default prefix is 0
|
70
|
-
rvm_patch_prefix=0
|
71
|
-
# checking, if the patch file path has a prefix separator
|
72
|
-
patch_has_prefix=$(echo $patch | grep -q ${patch_prefix_separator}; echo $?)
|
73
|
-
if [[ "x${patch_has_prefix}" = "x0" ]]; then
|
74
|
-
# so, if it has...
|
75
|
-
rvm_patch_prefix=$(echo $patch | cut -d ${patch_prefix_separator} -f 2)
|
76
|
-
patch=$(echo $patch | cut -d ${patch_prefix_separator} -f 1)
|
77
|
-
fi
|
78
|
-
__rvm_run "patch" "patch -p${rvm_patch_prefix} -f < $patch" "Applying patch '$patch'..."
|
79
|
-
if [[ $? -gt 0 ]] ; then
|
80
|
-
$rvm_scripts_path/log "error" "Patch $patch did not apply cleanly... back to the patching board :(" ; exit 1
|
81
|
-
fi
|
82
|
-
done
|
83
|
-
fi
|
84
|
-
|
85
112
|
rvm_ruby_make=${rvm_ruby_make:-"make"}
|
86
|
-
__rvm_run "make" "$rvm_ruby_make $rvm_make_flags" "Compiling $rvm_ruby_string, this may take a while
|
113
|
+
__rvm_run "make" "$rvm_ruby_make $rvm_make_flags" "Compiling $rvm_ruby_string, this may take a while depending on your cpu(s)..."
|
87
114
|
result=$? ; if [[ "$result" -gt 0 ]] ; then
|
88
115
|
$rvm_scripts_path/log "error" "There has been an error while running make. Aborting the installation." ; __rvm_pushpop ; return $result
|
89
116
|
fi
|
@@ -225,10 +252,15 @@ RubyWrapper
|
|
225
252
|
|
226
253
|
__rvm_db "${rvm_ruby_interpreter}_configure_flags" "db_configure_flags"
|
227
254
|
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
255
|
+
__rvm_apply_patches "$rvm_ruby_src_path/source"
|
256
|
+
result=$? ; if [[ "$result" -gt 0 ]] ; then
|
257
|
+
$rvm_scripts_path/log "error" "There has been an error while trying to apply patches to ree. Aborting the installation." ; __rvm_pushpop ; return $result
|
258
|
+
fi
|
259
|
+
|
260
|
+
__rvm_run "install" "./installer -a $rvm_rubies_path/$rvm_ruby_interpreter-$rvm_ruby_version-$rvm_ruby_patch_level $rvm_ree_options $db_configure_flags $rvm_ruby_configure_flags" "Installing $rvm_ruby_string, this may take a while depending on your cpu(s)..."
|
261
|
+
result=$? ; if [[ "$result" -gt 0 ]] ; then
|
262
|
+
$rvm_scripts_path/log "error" "There has been an error while trying to run the ree installer. Aborting the installation." ; __rvm_pushpop ; return $result
|
263
|
+
fi
|
232
264
|
|
233
265
|
chmod +x $rvm_ruby_home/bin/*
|
234
266
|
|
@@ -262,7 +294,7 @@ RubyWrapper
|
|
262
294
|
PATH=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
|
263
295
|
PATH=$rvm_bin_path:$PATH ; export PATH
|
264
296
|
|
265
|
-
if [[
|
297
|
+
if [[ -n "$(echo $rvm_ruby_version | awk '/^1\.0/')" ]] && [[ -z "$rvm_head_flag" ]] ; then
|
266
298
|
$rvm_scripts_path/log "info" "Downloading $rvm_ruby_package_file, this may take a while depending on your connection..."
|
267
299
|
$rvm_scripts_path/fetch "$rvm_url"
|
268
300
|
result=$? ; if [[ "$result" -gt 0 ]] ; then
|
@@ -286,12 +318,17 @@ RubyWrapper
|
|
286
318
|
|
287
319
|
builtin cd "$rvm_ruby_src_path" ; chmod +x ./configure
|
288
320
|
|
321
|
+
__rvm_apply_patches
|
322
|
+
result=$? ; if [[ "$result" -gt 0 ]] ; then
|
323
|
+
$rvm_scripts_path/log "error" "There has been an error while trying to apply patches to rubinius. Aborting the installation." ; __rvm_pushpop ; return $result
|
324
|
+
fi
|
325
|
+
|
289
326
|
__rvm_db "${rvm_ruby_interpreter}_configure_flags" "db_configure_flags"
|
290
327
|
|
291
|
-
export ruby="$
|
328
|
+
export ruby="$(__rvm_18_compat_ruby)"
|
292
329
|
|
293
330
|
rvm_ruby_configure_flags="${rvm_ruby_configure_flags:-"--skip-system"}"
|
294
|
-
rvm_ruby_configure="$ruby configure --prefix=$rvm_ruby_home $db_configure_flags $rvm_ruby_configure_flags" ; message="Configuring rbx"
|
331
|
+
rvm_ruby_configure="$rvm_bin_path/$ruby configure --prefix=$rvm_ruby_home $db_configure_flags $rvm_ruby_configure_flags" ; message="Configuring rbx"
|
295
332
|
if [[ "$rvm_llvm_flag" = "0" ]] ; then
|
296
333
|
rvm_ruby_configure="$rvm_ruby_configure --disable-llvm"
|
297
334
|
else
|
@@ -305,9 +342,9 @@ RubyWrapper
|
|
305
342
|
fi
|
306
343
|
|
307
344
|
if [[ "$rvm_trace_flag" -eq 1 ]] ; then
|
308
|
-
rvm_ruby_make="$ruby
|
345
|
+
rvm_ruby_make="$rvm_wrappers_path/$ruby/rake install --trace" ; message="Compiling rbx (with --trace)"
|
309
346
|
else
|
310
|
-
rvm_ruby_make="$ruby
|
347
|
+
rvm_ruby_make="$rvm_wrappers_path/$ruby/rake install" ; message="Compiling rbx"
|
311
348
|
fi
|
312
349
|
__rvm_run "rake" "$rvm_ruby_make" "$message"
|
313
350
|
result=$? ; if [[ "$result" -gt 0 ]] ; then
|
@@ -472,14 +509,14 @@ RubyWrapper
|
|
472
509
|
|
473
510
|
if [[ ! -e ${rvm_ruby_home}/etc/conf.d/maglev.conf ]] ; then
|
474
511
|
$rvm_scripts_path/log "info" "Creating default 'maglev' repository."
|
475
|
-
$
|
512
|
+
$rvm_wrappers_path/$compatible_ruby/rake "stone:create[maglev]" >/dev/null 2>&1
|
476
513
|
fi
|
477
514
|
|
478
515
|
$rvm_scripts_path/log "info" "Generating maglev HTML documentation"
|
479
|
-
$
|
516
|
+
$rvm_wrappers_path/$compatible_ruby/rake rdoc >/dev/null 2>&1
|
480
517
|
|
481
518
|
$rvm_scripts_path/log "info" "Generating smalltalk FFI."
|
482
|
-
$
|
519
|
+
$rvm_wrappers_path/$compatible_ruby/rake stwrappers >/dev/null 2>&1
|
483
520
|
|
484
521
|
unset compatible_ruby
|
485
522
|
|
@@ -518,10 +555,10 @@ RubyWrapper
|
|
518
555
|
|
519
556
|
compatible_ruby="$(__rvm_18_compat_ruby)"
|
520
557
|
|
521
|
-
$
|
558
|
+
$rvm_wrappers_path/$compatible_ruby/gem install pathname2 --no-rdoc --no-ri
|
522
559
|
|
523
560
|
# MONO_LIB=/Library/Frameworks/Mono.framework/Versions/current/lib/
|
524
|
-
rvm_ruby_make="$
|
561
|
+
rvm_ruby_make="$rvm_wrappers_path/$compatible_ruby/rake MERLIN_ROOT=\"$rvm_ruby_src_path/Merlin/Main\" compile mono=1 configuration=release --trace"
|
525
562
|
__rvm_run "rake" "$rvm_ruby_make" "Building IronRuby..."
|
526
563
|
unset compatible_ruby
|
527
564
|
if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
|
@@ -580,11 +617,16 @@ RubyWrapper
|
|
580
617
|
|
581
618
|
__rvm_fetch_from_github "mput" "trunk"
|
582
619
|
|
620
|
+
__rvm_apply_patches
|
621
|
+
result=$? ; if [[ "$result" -gt 0 ]] ; then
|
622
|
+
$rvm_scripts_path/log "error" "There has been an error while trying to apply patches to mput. Aborting the installation." ; return $result
|
623
|
+
fi
|
624
|
+
|
583
625
|
if [[ ! -s "$rvm_ruby_src_path/configure" ]] ; then
|
584
626
|
if command -v autoconf &> /dev/null ; then
|
585
627
|
__rvm_run "autoconf" "autoconf" "Running autoconf"
|
586
628
|
else
|
587
|
-
$rvm_scripts_path/log "fail" "rvm expects autoconf to install this ruby interpreter, autoconf was not found in PATH. Aborting installation." ;
|
629
|
+
result=$?; $rvm_scripts_path/log "fail" "rvm expects autoconf to install this ruby interpreter, autoconf was not found in PATH. Aborting installation." ; return $result
|
588
630
|
fi
|
589
631
|
fi
|
590
632
|
|
@@ -606,7 +648,7 @@ RubyWrapper
|
|
606
648
|
fi
|
607
649
|
|
608
650
|
rvm_ruby_make=${rvm_ruby_make:-"make"}
|
609
|
-
__rvm_run "make" "$rvm_ruby_make $rvm_make_flags" "Compiling $rvm_ruby_string, this may take a while
|
651
|
+
__rvm_run "make" "$rvm_ruby_make $rvm_make_flags" "Compiling $rvm_ruby_string, this may take a while depending on your cpu(s)..."
|
610
652
|
result=$? ; if [[ "$result" -gt 0 ]] ; then
|
611
653
|
$rvm_scripts_path/log "error" "There has been an error while trying to run make. Aborting the installation." ; __rvm_pushpop ; return $result
|
612
654
|
fi
|
data/scripts/manpages
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
source "$rvm_scripts_path/initialize"
|
4
|
+
|
5
|
+
# Take if a semicolon is encountered at the end of the
|
6
|
+
# manpath env variable, man also processes the usual,
|
7
|
+
# generated manpaths as well as the variable contents.
|
8
|
+
export MANPATH="${rvm_man_path}:${MANPATH}"
|
data/scripts/patches
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
# General tools for manipulating patches
|
4
|
+
# and dealing with patches.
|
5
|
+
|
6
|
+
# Returns the path used to look for a patch given a specific name.
|
7
|
+
__rvm_patch_lookup_path() {
|
8
|
+
echo "/"
|
9
|
+
[[ -n "$rvm_patch_original_pwd" ]] && echo "$rvm_patch_original_pwd/"
|
10
|
+
echo "$PWD/"
|
11
|
+
__rvm_ruby_string_paths_under "$rvm_patches_path" | sed 's/$/\//'
|
12
|
+
}
|
13
|
+
|
14
|
+
__rvm_expand_patch_name() {
|
15
|
+
[[ -z "$1" ]] && return
|
16
|
+
expanded_patch_name="$($rvm_scripts_path/patchsets show "$1")"
|
17
|
+
if [[ "$?" == "0" ]]; then
|
18
|
+
echo "$expanded_patch_name"
|
19
|
+
elif [[ "$1" != "default" ]]; then
|
20
|
+
echo "$1"
|
21
|
+
fi
|
22
|
+
unset expanded_patch_name
|
23
|
+
}
|
24
|
+
|
25
|
+
# Return the full patch for a given patch.
|
26
|
+
__rvm_lookup_full_patch_path() {
|
27
|
+
# Absolute path, pwd and then finally the rvm patches path.
|
28
|
+
for directory in $(__rvm_patch_lookup_path) ; do
|
29
|
+
for extension in {"",.patch,.diff}; do
|
30
|
+
patch_path="${directory}${1}${extension}"
|
31
|
+
if [[ -s "$patch_path" ]]; then
|
32
|
+
echo "$patch_path"
|
33
|
+
return
|
34
|
+
fi
|
35
|
+
done; unset extension patch_path
|
36
|
+
done; unset directory
|
37
|
+
return 1
|
38
|
+
}
|
data/scripts/patchsets
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
rvm_base_except="selector"
|
4
|
+
source "$rvm_scripts_path/base"
|
5
|
+
source "$rvm_scripts_path/patches"
|
6
|
+
|
7
|
+
lookup_patchset() {
|
8
|
+
if [[ -z "$1" ]]; then
|
9
|
+
echo "Usage: rvm patchset show name"
|
10
|
+
return 1
|
11
|
+
fi
|
12
|
+
for lookup_path in $(__rvm_ruby_string_paths_under "$rvm_patchsets_path") ; do
|
13
|
+
if [[ -s "$lookup_path/$1" ]]; then
|
14
|
+
cat "$lookup_path/$1"
|
15
|
+
return
|
16
|
+
fi
|
17
|
+
done; unset lookup_path
|
18
|
+
return 1
|
19
|
+
}
|
20
|
+
|
21
|
+
# Return the full patch for a given patch.
|
22
|
+
__rvm_lookup_full_patch_path() {
|
23
|
+
# Absolute path, pwd and then finally the rvm patches path.
|
24
|
+
for directory in $(__rvm_patch_lookup_path) ; do
|
25
|
+
for extension in {"",.patch,.diff}; do
|
26
|
+
patch_path="${directory}${1}${extension}"
|
27
|
+
if [[ -s "$patch_path" ]]; then
|
28
|
+
echo "$patch_path"
|
29
|
+
return
|
30
|
+
fi
|
31
|
+
done; unset extension patch_path
|
32
|
+
done; unset directory
|
33
|
+
return 1
|
34
|
+
}
|
35
|
+
|
36
|
+
usage() {
|
37
|
+
echo "Usage: 'rvm patchset {show,lookup}'"
|
38
|
+
echo " Tools for manipulating patchsets."
|
39
|
+
return 1
|
40
|
+
}
|
41
|
+
|
42
|
+
case "$1" in
|
43
|
+
show|lookup) lookup_patchset "$2" ;;
|
44
|
+
*) usage ;;
|
45
|
+
esac
|
46
|
+
|
47
|
+
exit $?
|
data/scripts/rubygems
CHANGED
@@ -89,7 +89,7 @@ fi
|
|
89
89
|
#
|
90
90
|
if [[ $# -gt 0 ]] ; then
|
91
91
|
version="$1" ; shift
|
92
|
-
args
|
92
|
+
args="$(echo "$@" | __rvm_strip)"
|
93
93
|
else
|
94
94
|
$rvm_scripts_path/log "error" "A version must be specified, for example 'rvm rubygems 1.3.7'"
|
95
95
|
exit 1
|
data/scripts/rvm
CHANGED
@@ -62,6 +62,7 @@ if [[ "$rvm_loaded_flag" != "1" ]] || [[ "$rvm_reload_flag" = "1" ]] ; then
|
|
62
62
|
source $rvm_scripts_path/version
|
63
63
|
source $rvm_scripts_path/selector
|
64
64
|
source $rvm_scripts_path/cli
|
65
|
+
source $rvm_scripts_path/manpages
|
65
66
|
source $rvm_scripts_path/cd
|
66
67
|
|
67
68
|
rvm_loaded_flag=1
|
data/scripts/rvm-install
CHANGED
@@ -124,7 +124,7 @@ done
|
|
124
124
|
#
|
125
125
|
# Scripts
|
126
126
|
#
|
127
|
-
for dir_name in config scripts examples lib hooks help ; do
|
127
|
+
for dir_name in config scripts examples lib hooks help patches; do
|
128
128
|
spinner
|
129
129
|
mkdir -p "$rvm_path/$dir_name"
|
130
130
|
if [[ -d "$source_path/$dir_name" ]] ; then
|
@@ -184,7 +184,7 @@ fi
|
|
184
184
|
#
|
185
185
|
spinner
|
186
186
|
mkdir -p "$rvm_gemsets_path"
|
187
|
-
for gemset_file in $(cd gemsets ; find . -iname '*.gems' | sed 's
|
187
|
+
for gemset_file in $(cd gemsets ; find . -iname '*.gems' | sed 's/^\.\///') ; do
|
188
188
|
source_path="$(pwd)/gemsets"
|
189
189
|
destination="$rvm_gemsets_path/$gemset_file"
|
190
190
|
destination_path="$(dirname "$destination")"
|
@@ -192,7 +192,20 @@ for gemset_file in $(cd gemsets ; find . -iname '*.gems' | sed 's/\.\///') ; do
|
|
192
192
|
mkdir -p "$destination_path"
|
193
193
|
cp "$source_path/$gemset_file" "$destination"
|
194
194
|
fi
|
195
|
-
done ; unset destination destination_path source_path
|
195
|
+
done ; unset destination destination_path source_path gemset_file
|
196
|
+
|
197
|
+
spinner
|
198
|
+
mkdir -p "$rvm_patchsets_path"
|
199
|
+
for patchsets_file in $(cd gemsets ; find . -iname '*' | sed 's/^\.\///') ; do
|
200
|
+
source_path="$(pwd)/gemsets"
|
201
|
+
destination="$rvm_patchsets_path/$patchset_file"
|
202
|
+
destination_path="$(dirname "$destination")"
|
203
|
+
if [[ ! -s "$destination" ]] ; then
|
204
|
+
mkdir -p "$destination_path"
|
205
|
+
cp "$source_path/$patchset_file" "$destination"
|
206
|
+
fi
|
207
|
+
done ; unset destination destination_path source_path patchset_file
|
208
|
+
|
196
209
|
|
197
210
|
#
|
198
211
|
# Migrate ~/.rvm/ruby-X,jruby-X,... to ~/.rvm/rubies/ for 0.1.0.
|
@@ -266,6 +279,10 @@ if [[ "root" = "$(whoami)" ]] ; then
|
|
266
279
|
mkdir -p $rvm_bin_path
|
267
280
|
chmod +x $rvm_bin_path/rvm
|
268
281
|
chmod +x $rvm_bin_path/rvmsudo
|
282
|
+
printf "\n Copying manpages into place."
|
283
|
+
for man_file in $(\ls "$install_source_path/man"); do
|
284
|
+
cp -f "$install_source_path/man/$man_file" "$rvm_man_path/$man_file"
|
285
|
+
done
|
269
286
|
fi
|
270
287
|
|
271
288
|
if [[ "$upgrade_flag" -eq 0 ]] ; then
|
data/scripts/selector
CHANGED
@@ -349,7 +349,6 @@ __rvm_ruby_string() {
|
|
349
349
|
# * rvm_ruby_patch_level
|
350
350
|
# * rvm_ruby_revision
|
351
351
|
# * rvm_ruby_tag
|
352
|
-
# * rvm_ruby_patch
|
353
352
|
|
354
353
|
# Alias'd rubies
|
355
354
|
if [[ -z "$rvm_expanding_aliases" ]]; then
|
@@ -414,9 +413,6 @@ __rvm_ruby_string() {
|
|
414
413
|
rvm_ruby_tag="$string"
|
415
414
|
elif $rvm_scripts_path/match "$string" "^m[0-9]" ; then
|
416
415
|
rvm_ruby_mode="$string"
|
417
|
-
elif $rvm_scripts_path/match "$string" "^h[a-z0-9]" ; then
|
418
|
-
unset rvm_ruby_patch_level rvm_ruby_revision rvm_ruby_tag
|
419
|
-
rvm_ruby_patch="$string"
|
420
416
|
elif $rvm_scripts_path/match "$string" "^u[a-z0-9]" ; then
|
421
417
|
unset rvm_ruby_patch_level rvm_ruby_revision rvm_ruby_tag rvm_ruby_patch
|
422
418
|
rvm_ruby_user_tag="$string"
|
@@ -480,6 +476,7 @@ __rvm_ruby_string() {
|
|
480
476
|
rvm_ruby_string="$(echo $rvm_ruby_string | sed 's#-p*#-#')"
|
481
477
|
else
|
482
478
|
rvm_ruby_string="$(echo $rvm_ruby_string | sed 's#-pp#-p#')"
|
479
|
+
rvm_ruby_string="$(echo $rvm_ruby_string | sed 's#-prc#-rc#')"
|
483
480
|
fi
|
484
481
|
fi
|
485
482
|
fi
|
data/scripts/update
CHANGED
@@ -124,7 +124,7 @@ done
|
|
124
124
|
#
|
125
125
|
# Scripts
|
126
126
|
#
|
127
|
-
for dir_name in config scripts examples lib hooks help ; do
|
127
|
+
for dir_name in config scripts examples lib hooks help patches; do
|
128
128
|
spinner
|
129
129
|
mkdir -p "$rvm_path/$dir_name"
|
130
130
|
if [[ -d "$source_path/$dir_name" ]] ; then
|
@@ -184,7 +184,7 @@ fi
|
|
184
184
|
#
|
185
185
|
spinner
|
186
186
|
mkdir -p "$rvm_gemsets_path"
|
187
|
-
for gemset_file in $(cd gemsets ; find . -iname '*.gems' | sed 's
|
187
|
+
for gemset_file in $(cd gemsets ; find . -iname '*.gems' | sed 's/^\.\///') ; do
|
188
188
|
source_path="$(pwd)/gemsets"
|
189
189
|
destination="$rvm_gemsets_path/$gemset_file"
|
190
190
|
destination_path="$(dirname "$destination")"
|
@@ -192,7 +192,20 @@ for gemset_file in $(cd gemsets ; find . -iname '*.gems' | sed 's/\.\///') ; do
|
|
192
192
|
mkdir -p "$destination_path"
|
193
193
|
cp "$source_path/$gemset_file" "$destination"
|
194
194
|
fi
|
195
|
-
done ; unset destination destination_path source_path
|
195
|
+
done ; unset destination destination_path source_path gemset_file
|
196
|
+
|
197
|
+
spinner
|
198
|
+
mkdir -p "$rvm_patchsets_path"
|
199
|
+
for patchsets_file in $(cd gemsets ; find . -iname '*' | sed 's/^\.\///') ; do
|
200
|
+
source_path="$(pwd)/gemsets"
|
201
|
+
destination="$rvm_patchsets_path/$patchset_file"
|
202
|
+
destination_path="$(dirname "$destination")"
|
203
|
+
if [[ ! -s "$destination" ]] ; then
|
204
|
+
mkdir -p "$destination_path"
|
205
|
+
cp "$source_path/$patchset_file" "$destination"
|
206
|
+
fi
|
207
|
+
done ; unset destination destination_path source_path patchset_file
|
208
|
+
|
196
209
|
|
197
210
|
#
|
198
211
|
# Migrate ~/.rvm/ruby-X,jruby-X,... to ~/.rvm/rubies/ for 0.1.0.
|
@@ -266,6 +279,10 @@ if [[ "root" = "$(whoami)" ]] ; then
|
|
266
279
|
mkdir -p $rvm_bin_path
|
267
280
|
chmod +x $rvm_bin_path/rvm
|
268
281
|
chmod +x $rvm_bin_path/rvmsudo
|
282
|
+
printf "\n Copying manpages into place."
|
283
|
+
for man_file in $(\ls "$install_source_path/man"); do
|
284
|
+
cp -f "$install_source_path/man/$man_file" "$rvm_man_path/$man_file"
|
285
|
+
done
|
269
286
|
fi
|
270
287
|
|
271
288
|
if [[ "$upgrade_flag" -eq 0 ]] ; then
|
data/scripts/utility
CHANGED
@@ -27,6 +27,17 @@ __rvm_teardown() {
|
|
27
27
|
unset rvm_ruby_strings
|
28
28
|
}
|
29
29
|
|
30
|
+
# Return a list of directories under a given base path.
|
31
|
+
# Derived from rvm_ruby_string.
|
32
|
+
__rvm_ruby_string_paths_under() {
|
33
|
+
local patch_parts="$(echo "$rvm_ruby_string" | tr '-' ' ' | __rvm_strip)"
|
34
|
+
while true; do
|
35
|
+
echo "$1/$patch_parts" | tr ' ' '/' | sed 's#\/$##'
|
36
|
+
[[ -z "$patch_parts" ]] && break
|
37
|
+
patch_parts="$(echo "$patch_parts" | awk '{$NF=""; print}' | __rvm_strip)"
|
38
|
+
done
|
39
|
+
}
|
40
|
+
|
30
41
|
# Query the rvm key-value database for a specific key
|
31
42
|
# Allow overrides from user specifications in $rvm_config_path/user
|
32
43
|
__rvm_db() {
|
@@ -158,7 +169,7 @@ __rvm_cleanup_variables() {
|
|
158
169
|
|
159
170
|
if [[ "$rvm_sticky_flag" = "1" ]] ; then export rvm_gemset_name ; else unset rvm_gemset_name ; fi
|
160
171
|
|
161
|
-
unset rvm_action rvm_irbrc_file rvm_command rvm_error_message rvm_url rvm_force_flag rvm_all_flag rvm_reconfigure_flag rvm_make_flags rvm_bin_flag rvm_import_flag rvm_export_flag rvm_self_flag rvm_gem_flag rvm_rubygems_flag rvm_debug_flag rvm_delete_flag rvm_summary_flag rvm_test_flag _rvm_spec_flag rvm_json_flag rvm_yaml_flag rvm_shebang_flag rvm_env_flag rvm_tail_flag rvm_use_flag rvm_dir_flag rvm_list_flag rvm_empty_flag rvm_file_name rvm_benchmark_flag rvm_clear_flag rvm_name_flag rvm_verbose_flag rvm_user_flag rvm_system_flag rvm_ruby_configure_flags rvm_uninstall_flag rvm_install_flag rvm_llvm_flag rvm_ruby_bits
|
172
|
+
unset rvm_action rvm_irbrc_file rvm_command rvm_error_message rvm_url rvm_force_flag rvm_all_flag rvm_reconfigure_flag rvm_make_flags rvm_bin_flag rvm_import_flag rvm_export_flag rvm_self_flag rvm_gem_flag rvm_rubygems_flag rvm_debug_flag rvm_delete_flag rvm_summary_flag rvm_test_flag _rvm_spec_flag rvm_json_flag rvm_yaml_flag rvm_shebang_flag rvm_env_flag rvm_tail_flag rvm_use_flag rvm_dir_flag rvm_list_flag rvm_empty_flag rvm_file_name rvm_benchmark_flag rvm_clear_flag rvm_name_flag rvm_verbose_flag rvm_user_flag rvm_system_flag rvm_ruby_configure_flags rvm_uninstall_flag rvm_install_flag rvm_llvm_flag rvm_ruby_bits rvm_sticky_flag rvm_rvmrc_flag rvm_gems_flag rvm_only_path_flag rvm_docs_flag rvm_ruby_aliases rvm_ruby_aliases rvm_patch_names
|
162
173
|
}
|
163
174
|
|
164
175
|
# Unset ruby-specific variables
|
@@ -194,15 +205,12 @@ __rvm_18_compat_ruby() {
|
|
194
205
|
__rvm_ensure_has_18_compat_ruby() {
|
195
206
|
if [[ -z "$(__rvm_18_compat_ruby)" ]]; then
|
196
207
|
# TODO: install currently doesn't return the correct status.
|
197
|
-
original_ruby="$(__rvm_environment_identifier)"
|
198
208
|
local compat_result=0
|
199
|
-
if !
|
209
|
+
if ! ( rvm install 1.8.7 ); then
|
200
210
|
$rvm_scripts_path/log "fatal" "To proceed rvm requires a 1.8-compatible ruby is installed. We attempted to install 1.8.7 automatically but it failed."
|
201
211
|
$rvm_scripts_path/log "fatal" "Please install it manually (or a compatible alternative) to proceed."
|
202
212
|
compat_result=1
|
203
213
|
fi
|
204
|
-
__rvm_unset_ruby_variables
|
205
|
-
__rvm_become "$original_ruby"
|
206
214
|
unset original_ruby
|
207
215
|
return $compat_result
|
208
216
|
fi
|
@@ -708,6 +716,11 @@ __rvm_ensure_has_enviroment_files() {
|
|
708
716
|
fi
|
709
717
|
}
|
710
718
|
|
719
|
+
# Strip whitespace and normalize it all.
|
720
|
+
__rvm_strip() {
|
721
|
+
sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' -e 's/[[:space:]]\{1,\}/ /g'
|
722
|
+
}
|
723
|
+
|
711
724
|
__rvm_using_gemset_globalcache() {
|
712
725
|
$rvm_scripts_path/db "$rvm_config_path/user" "use_gemset_globalcache" | grep -q '^true$'
|
713
726
|
}
|
data/scripts/wrapper
CHANGED
@@ -7,7 +7,7 @@ unset rvm_default_flag rvm_wrapper_name
|
|
7
7
|
source "$rvm_scripts_path/base"
|
8
8
|
|
9
9
|
full_binary_name() {
|
10
|
-
echo "$binary_name" |
|
10
|
+
echo "$binary_name" | __rvm_strip
|
11
11
|
}
|
12
12
|
|
13
13
|
wrap() {
|
@@ -61,7 +61,7 @@ ruby_string="$1"; shift
|
|
61
61
|
prefix="$1"
|
62
62
|
if [[ -n "$1" ]]; then shift; fi
|
63
63
|
|
64
|
-
binaries="$(echo "$@" |
|
64
|
+
binaries="$(echo "$@" | __rvm_strip)"
|
65
65
|
|
66
66
|
if [[ 'system' == '$ruby_string' ]]; then
|
67
67
|
$rvm_scripts_path/log "error" "Wrapper can't be called with system rubies - sorry!"
|
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: 73
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 41
|
10
|
+
version: 0.1.41
|
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-
|
18
|
+
date: 2010-07-08 00:00:00 -04:00
|
19
19
|
default_executable: rvm-install
|
20
20
|
dependencies: []
|
21
21
|
|
@@ -102,11 +102,14 @@ files:
|
|
102
102
|
- scripts/log
|
103
103
|
- scripts/maglev
|
104
104
|
- scripts/manage
|
105
|
+
- scripts/manpages
|
105
106
|
- scripts/match
|
106
107
|
- scripts/md5
|
107
108
|
- scripts/monitor
|
108
109
|
- scripts/notes
|
109
110
|
- scripts/package
|
111
|
+
- scripts/patches
|
112
|
+
- scripts/patchsets
|
110
113
|
- scripts/rubygems
|
111
114
|
- scripts/rvm
|
112
115
|
- scripts/rvm-install
|