rvm 1.0.4 → 1.0.5
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 +3 -2
- data/scripts/alias +49 -27
- data/scripts/base +21 -6
- data/scripts/cli +159 -84
- data/scripts/default +61 -0
- data/scripts/docs +17 -15
- data/scripts/env +7 -5
- data/scripts/fetch +10 -10
- data/scripts/gemsets +17 -8
- data/scripts/hook +1 -1
- data/scripts/info +73 -54
- data/scripts/initialize +2 -4
- data/scripts/list +12 -8
- data/scripts/log +1 -1
- data/scripts/manage +317 -264
- data/scripts/notes +84 -38
- data/scripts/package +50 -39
- data/scripts/patches +1 -1
- data/scripts/repair +10 -9
- data/scripts/rubygems +3 -3
- data/scripts/selector +45 -58
- data/scripts/set +28 -18
- data/scripts/snapshot +42 -37
- data/scripts/tools +2 -2
- data/scripts/utility +91 -99
- data/scripts/wrapper +11 -8
- metadata +5 -4
data/scripts/notes
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
3
|
system="$(uname)"
|
4
|
-
item="* "
|
5
4
|
|
6
5
|
if [[ "Linux" = "$system" ]] ; then
|
7
6
|
for file in /etc/*-release ; do
|
@@ -9,66 +8,113 @@ if [[ "Linux" = "$system" ]] ; then
|
|
9
8
|
done
|
10
9
|
printf "\n\nNotes for ${system} $release\n"
|
11
10
|
|
12
|
-
rvm_aptitude_binary="$(command -v aptitude ||
|
11
|
+
rvm_aptitude_binary="$(command -v aptitude || command -v apt-get)"
|
13
12
|
rvm_emerge_binary="$(command -v emerge)"
|
14
13
|
rvm_pacman_binary="$(command -v pacman)"
|
15
14
|
rvm_yum_binary="$(command -v yum)"
|
16
15
|
|
17
|
-
printf "
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
16
|
+
printf "
|
17
|
+
# NOTE: MRI stands for Matz's Ruby Interpreter (1.8.X, 1.9.X), ree stands for Ruby Enterprise Edition and rbx stands for Rubinius.
|
18
|
+
# curl is required.
|
19
|
+
# git is required.
|
20
|
+
# patch is required (for ree, some ruby head's).
|
21
|
+
# If you wish to install rbx and/or any MRI head (eg. 1.9.2-head) then you must install and use rvm 1.8.7 first.
|
22
|
+
# If you wish to have the 'pretty colors' again, set 'export rvm_pretty_print=1' in ~/.rvmrc.
|
23
|
+
"
|
22
24
|
|
23
25
|
if [[ ! -z "$rvm_aptitude_binary" ]] ; then
|
24
|
-
printf "
|
25
|
-
|
26
|
+
printf "
|
27
|
+
dependencies:
|
28
|
+
# For RVM
|
29
|
+
rvm: bash curl git-core
|
26
30
|
|
27
|
-
|
28
|
-
|
31
|
+
# For JRuby (if you wish to use it) you will need:
|
32
|
+
jruby: aptitude install curl sun-java6-bin sun-java6-jre sun-java6-jdk
|
29
33
|
|
30
|
-
|
31
|
-
|
34
|
+
# For MRI & ree (if you wish to use it) you will need (depending on what you are installing):
|
35
|
+
ruby: aptitude install build-essential bison openssl libreadline5 libreadline-dev curl git-core zlib1g zlib1g-dev libssl-dev libsqlite3-0 libsqlite3-dev sqlite3 libreadline-dev libxml2-dev git-core
|
36
|
+
ruby-head: git subversion autoconf
|
37
|
+
|
38
|
+
# For IronRuby (if you wish to use it) you will need:
|
39
|
+
ironruby: aptitude install curl mono-2.0-devel
|
40
|
+
"
|
32
41
|
|
33
42
|
elif [[ ! -z "$rvm_emerge_binary" ]] ; then
|
34
|
-
printf "
|
35
|
-
|
43
|
+
printf "
|
44
|
+
dependencies:
|
45
|
+
# For RVM
|
46
|
+
rvm: bash curl git
|
47
|
+
|
48
|
+
# For MRI based rubies you will need:
|
49
|
+
ruby: # TODO: tell Wayne what goes here :)
|
50
|
+
ruby-head: # TODO: tell Wayne what goes here :)
|
51
|
+
|
52
|
+
# For JRuby (if you wish to use it) you will need:
|
53
|
+
jruby: emerge dev-java/sun-jdk dev-java/sun-jre-bin
|
36
54
|
|
37
|
-
|
38
|
-
|
55
|
+
# For IronRuby (if you wish to use it) you will need:
|
56
|
+
ironruby: emerge dev-lang/mono
|
57
|
+
"
|
39
58
|
|
40
59
|
elif [[ ! -z "$rvm_pacman_binary" ]] ; then
|
41
|
-
printf "
|
42
|
-
|
60
|
+
printf "
|
61
|
+
dependencies:
|
62
|
+
# For RVM itself
|
63
|
+
rvm: bash curl git
|
43
64
|
|
44
|
-
|
45
|
-
|
65
|
+
# For MRI based rubies you will need:
|
66
|
+
ruby: pacman -Sy --noconfirm patch curl bison zlib readline libxml2 git
|
67
|
+
ruby-head: pacman -Sy --noconfirm subversion autoconf diffutils patch bison
|
46
68
|
|
47
|
-
|
48
|
-
|
69
|
+
# For JRuby (if you wish to use it) you will need:
|
70
|
+
jruby: pacman -Sy --noconfirm jdk jre curl
|
71
|
+
|
72
|
+
# For IronRuby (if you wish to use it) you will need:
|
73
|
+
ironruby: pacman -Sy --noconfirm mono
|
74
|
+
"
|
49
75
|
|
50
76
|
elif [[ ! -z "$rvm_yum_binary" ]] ; then
|
51
|
-
printf "
|
52
|
-
|
53
|
-
|
77
|
+
printf "
|
78
|
+
dependencies:
|
79
|
+
# For RVM
|
80
|
+
rvm: yum install -y bash curl git
|
81
|
+
|
82
|
+
# For MRI/ree (if you wish to use it) you will need:
|
83
|
+
ruby: yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel ; \\
|
84
|
+
yum install -y iconv-devel # NOTE: For centos 5.4 final iconv-devel might not be available :(
|
54
85
|
|
55
|
-
|
56
|
-
|
86
|
+
# For JRuby (if you wish to use it) you will need:
|
87
|
+
jruby: yum install -y java
|
88
|
+
"
|
57
89
|
|
58
90
|
else
|
59
|
-
printf "
|
60
|
-
|
61
|
-
|
62
|
-
|
91
|
+
printf "
|
92
|
+
dependencies:
|
93
|
+
# RVM
|
94
|
+
rvm: bash curl git
|
95
|
+
|
96
|
+
# FOR MRI Ruby, recommended system packages are
|
97
|
+
ruby: # gcc-c++ patch readline zlib libyaml iconv libxml2 libxslt
|
98
|
+
|
99
|
+
# For JRuby (if you wish to use it) you will need:
|
100
|
+
jruby: #The SUN java runtime environment and development kit.
|
101
|
+
|
102
|
+
# For IronRuby (if you wish to use it) you will need:
|
103
|
+
ironruby: #The Mono Runtime and Development Platform (version 2.6 or greater is recommended).
|
104
|
+
"
|
63
105
|
fi
|
64
106
|
elif [[ "Darwin" = "$system" ]] ; then
|
107
|
+
|
65
108
|
release="( $(sw_vers -productName) )"
|
66
|
-
|
67
|
-
printf "
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
109
|
+
|
110
|
+
printf "
|
111
|
+
Notes for ${system} $release
|
112
|
+
# For Snow Leopard be sure to have XCode Tools Version 3.2.1 (1613) or later (there were bugs with the dvd release version).
|
113
|
+
# You should download the latest XCode tools from developer.apple.com. This is necessary since the dvd install for Snow Leopard has bugs.
|
114
|
+
# If you intend on installing MacRuby you must install LLVM first.
|
115
|
+
# If you intend on installing JRuby you must install the JDK.
|
116
|
+
# If you intend on installing IronRuby you must install Mono (version 2.6 or greater is recommended).
|
117
|
+
"
|
72
118
|
fi
|
73
119
|
|
74
120
|
echo
|
data/scripts/package
CHANGED
@@ -17,40 +17,44 @@ install_package() {
|
|
17
17
|
|
18
18
|
if [[ ! -z "$rvm_make_flags_flag" ]] ; then __rvm_make_flags ; fi
|
19
19
|
|
20
|
-
|
21
|
-
|
22
|
-
"$rvm_scripts_path/log" "info" "Fetching $package-$version.$archive_format to $rvm_archives_path"
|
23
|
-
|
24
|
-
if [[ "$archive_format" = "tar.gz" ]] || [[ "$archive_format" = "tgz" ]] ; then
|
25
|
-
"$rvm_scripts_path/fetch" "$package_url/$package-$version.$archive_format" || (result=$? && return $result)
|
26
|
-
__rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format to $rvm_src_path"
|
27
|
-
elif [[ "$archive_format" = "tar.bz2" ]] ; then
|
28
|
-
"$rvm_scripts_path/fetch" "$package_url/$package-$version.$archive_format" || (result=$? && return $result)
|
29
|
-
__rvm_run "$package/extract" "tar jxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format to $rvm_src_path"
|
30
|
-
elif [[ "$archive_format" = "zip" ]] ; then
|
31
|
-
"$rvm_scripts_path/fetch" "$package_url/$package-$version.$archive_format" || (result=$? && return $result)
|
32
|
-
__rvm_run "$package/extract" "unzip -q -o $rvm_archives_path/$package-$version.$archive_format -d $rvm_src_path/$package-$version" "Extracting $package-$version.$archive_format to $rvm_src_path"
|
33
|
-
else
|
34
|
-
printf "\nUnrecognized archive format '$archive_format'" ; return 1
|
35
|
-
fi
|
20
|
+
(
|
21
|
+
builtin cd "$rvm_src_path"
|
36
22
|
|
37
|
-
|
23
|
+
"$rvm_scripts_path/log" "info" "Fetching $package-$version.$archive_format to $rvm_archives_path"
|
38
24
|
|
39
|
-
|
25
|
+
if [[ "$archive_format" = "tar.gz" ]] || [[ "$archive_format" = "tgz" ]] ; then
|
26
|
+
"$rvm_scripts_path/fetch" "$package_url/$package-$version.$archive_format" || (result=$? && return $result)
|
27
|
+
__rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format to $rvm_src_path"
|
40
28
|
|
41
|
-
|
29
|
+
elif [[ "$archive_format" = "tar.bz2" ]] ; then
|
30
|
+
"$rvm_scripts_path/fetch" "$package_url/$package-$version.$archive_format" || (result=$? && return $result)
|
31
|
+
__rvm_run "$package/extract" "tar jxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format to $rvm_src_path"
|
42
32
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
__rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package in $rvm_src_path/$package-$version."
|
47
|
-
__rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_usr_path"
|
48
|
-
fi
|
33
|
+
elif [[ "$archive_format" = "zip" ]] ; then
|
34
|
+
"$rvm_scripts_path/fetch" "$package_url/$package-$version.$archive_format" || (result=$? && return $result)
|
35
|
+
__rvm_run "$package/extract" "unzip -q -o $rvm_archives_path/$package-$version.$archive_format -d $rvm_src_path/$package-$version" "Extracting $package-$version.$archive_format to $rvm_src_path"
|
49
36
|
|
50
|
-
|
51
|
-
|
37
|
+
else
|
38
|
+
printf "\nUnrecognized archive format '$archive_format'" ; return 1
|
39
|
+
fi
|
52
40
|
|
53
|
-
|
41
|
+
builtin cd "$rvm_src_path/$package-$version"
|
42
|
+
|
43
|
+
__rvm_run "$package/configure" "${configure:-"./configure --prefix=${prefix_path:-"$rvm_usr_path"}"} $configure_flags" "Configuring $package in $rvm_src_path/$package-$version."
|
44
|
+
|
45
|
+
unset configure_flags
|
46
|
+
|
47
|
+
if [[ "$action" = "uninstall" ]] ; then
|
48
|
+
__rvm_run "$package/make.uninstall" "/usr/bin/make uninstall" "Uninstalling $package from $rvm_usr_path"
|
49
|
+
|
50
|
+
else
|
51
|
+
__rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package in $rvm_src_path/$package-$version."
|
52
|
+
__rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_usr_path"
|
53
|
+
fi
|
54
|
+
|
55
|
+
\touch "$rvm_config_path/packages"
|
56
|
+
"$rvm_scripts_path/db" "$rvm_config_path/packages" "${package}" "${version}"
|
57
|
+
)
|
54
58
|
}
|
55
59
|
|
56
60
|
readline() {
|
@@ -74,10 +78,13 @@ curl() {
|
|
74
78
|
openssl() {
|
75
79
|
package="openssl" ; version="0.9.8n" ; archive_format="tar.gz"
|
76
80
|
if [[ "Darwin" = "$(uname)" ]] ; then
|
81
|
+
|
77
82
|
if [[ ! -z "$rvm_archflags" ]]; then
|
83
|
+
|
78
84
|
if "$rvm_scripts_path/match" "$rvm_archflags" "64"; then
|
79
85
|
hw_cpu64bit=1
|
80
86
|
fi
|
87
|
+
|
81
88
|
if "$rvm_scripts_path/match" "$rvm_archflags" "ppc"; then
|
82
89
|
hw_machine="Power Macintosh"
|
83
90
|
fi
|
@@ -85,12 +92,15 @@ openssl() {
|
|
85
92
|
hw_machine=$(sysctl hw.machine | awk -F: '{print $2}' | sed 's/^ //')
|
86
93
|
hw_cpu64bit=$(sysctl hw.cpu64bit_capable | awk '{print $2}')
|
87
94
|
fi
|
95
|
+
|
88
96
|
if [[ "Power Macintosh" = "$hw_machine" ]] ; then
|
97
|
+
|
89
98
|
if [[ $hw_cpu64bit = 1 ]]; then
|
90
99
|
openssl_os="darwin64-ppc-cc"
|
91
100
|
else
|
92
101
|
openssl_os="darwin-ppc-cc"
|
93
102
|
fi
|
103
|
+
|
94
104
|
else
|
95
105
|
if [[ $hw_cpu64bit = 1 ]]; then
|
96
106
|
openssl_os="darwin64-x86_64-cc"
|
@@ -167,17 +177,18 @@ mono() {
|
|
167
177
|
llvm() {
|
168
178
|
package="llvm" ; version="89156"
|
169
179
|
if [[ ! -z "$rvm_make_flags_flag" ]] ; then __rvm_make_flags ; fi
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
180
|
+
(
|
181
|
+
builtin cd $rvm_src_path
|
182
|
+
if [[ ! -d "$rvm_src_path/llvm/.svn" ]] ; then
|
183
|
+
__rvm_db "${package}_url" "package_url"
|
184
|
+
\rm -rf "$rvm_src_path/llvm"
|
185
|
+
svn co -r "$version" "$package_url" llvm
|
186
|
+
builtin cd "$rvm_src_path/llvm"
|
187
|
+
./configure --enable-bindings=none
|
188
|
+
UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" ENABLE_OPTIMIZED=1 make -j2
|
189
|
+
sudo env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" ENABLE_OPTIMIZED=1 make install
|
190
|
+
fi
|
191
|
+
)
|
181
192
|
}
|
182
193
|
|
183
194
|
if [[ ! -z "$library" ]] ; then
|
data/scripts/patches
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
# Returns the path used to look for a patch given a specific name.
|
7
7
|
__rvm_patch_lookup_path() {
|
8
8
|
echo "/"
|
9
|
-
[[ -n "$rvm_patch_original_pwd" ]] && echo "$rvm_patch_original_pwd/"
|
9
|
+
[[ -n "${rvm_patch_original_pwd:-""}" ]] && echo "$rvm_patch_original_pwd/"
|
10
10
|
echo "$PWD/"
|
11
11
|
__rvm_ruby_string_paths_under "$rvm_patches_path" | sed 's/$/\//'
|
12
12
|
}
|
data/scripts/repair
CHANGED
@@ -10,15 +10,16 @@ usage() {
|
|
10
10
|
# Removes stale symlinks in $rvm_bin_path, likely
|
11
11
|
# related to wrappers.
|
12
12
|
repair_symlinks() {
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
13
|
+
(
|
14
|
+
builtin cd "$rvm_bin_path"
|
15
|
+
for executable_name in $(\find \. -type l); do
|
16
|
+
[[ -e "$executable_name" || "$(readlink "$executable_name")" != "$rvm_wrappers_path/"* ]] && continue
|
17
|
+
if [[ -f "$executable_name" ]] ; then
|
18
|
+
"$rvm_scripts_path/log" "info" "Removing stale symlink from $(basename "$executable_name")"
|
19
|
+
\rm -f "$executable_name"
|
20
|
+
fi
|
21
|
+
done
|
22
|
+
)
|
22
23
|
}
|
23
24
|
|
24
25
|
# Regenerates each symlink file.
|
data/scripts/rubygems
CHANGED
@@ -46,7 +46,7 @@ rubygems_setup() {
|
|
46
46
|
"$rvm_scripts_path/log" "info" "Retrieving $rvm_gem_package_name"
|
47
47
|
"$rvm_scripts_path/fetch" "$rvm_gem_url"
|
48
48
|
result=$? ; if [[ "$result" -gt 0 ]] ; then
|
49
|
-
"$rvm_scripts_path/log" "error" "There has been an error while trying to fetch the source. Aborting the installation." ;
|
49
|
+
"$rvm_scripts_path/log" "error" "There has been an error while trying to fetch the source. Aborting the installation." ; return $result
|
50
50
|
fi
|
51
51
|
\mkdir -p "$rvm_src_path/$rvm_gem_package_name"
|
52
52
|
__rvm_run "rubygems.extract" "gunzip < $rvm_archives_path/$rvm_gem_package_name.tgz | tar xf - -C $rvm_src_path" "Extracting $rvm_gem_package_name ..."
|
@@ -62,8 +62,8 @@ rubygems_setup() {
|
|
62
62
|
"$rvm_scripts_path/log" "warning" "Installation of rubygems did not complete successfully."
|
63
63
|
fi
|
64
64
|
|
65
|
-
if [[ ! -z "$
|
66
|
-
ruby_lib_gem_path="$rvm_ruby_home/lib/ruby/gems/${
|
65
|
+
if [[ ! -z "$rvm_ruby_major_version" ]] ; then
|
66
|
+
ruby_lib_gem_path="$rvm_ruby_home/lib/ruby/gems/${rvm_ruby_release_version}.${rvm_ruby_major_version}"
|
67
67
|
else
|
68
68
|
ruby_lib_gem_path="$rvm_ruby_home/lib/ruby/gems/$interpreter"
|
69
69
|
fi
|
data/scripts/selector
CHANGED
@@ -4,23 +4,14 @@
|
|
4
4
|
__rvm_select() {
|
5
5
|
|
6
6
|
# Set Variable Defaults
|
7
|
-
rvm_ruby_interpreter=${rvm_ruby_interpreter:-""}
|
8
|
-
rvm_head_flag=${rvm_head_flag:-0}
|
9
|
-
rvm_install_on_use_flag=${rvm_install_on_use_flag:-0}
|
10
|
-
rvm_ruby_version=${rvm_ruby_version:-""}
|
11
|
-
rvm_ruby_patch_level=${rvm_ruby_patch_level:-""}
|
12
|
-
rvm_ruby_revision=${rvm_ruby_revision:-""}
|
13
|
-
rvm_ruby_name=${rvm_ruby_name:-""}
|
14
|
-
rvm_ruby_gem_home=${rvm_ruby_gem_home:-""}
|
15
|
-
|
16
7
|
export GEM_HOME GEM_PATH BUNDLE_PATH MY_RUBY_HOME RUBY_VERSION
|
17
8
|
|
18
9
|
if [[ -z "${rvm_ruby_string:-""}" ]] ; then
|
19
|
-
|
20
|
-
[[ -n "$rvm_ruby_version" ]] && rvm_ruby_string="$rvm_ruby_string-$rvm_ruby_version"
|
21
|
-
[[ -n "$rvm_ruby_patch_level" ]] && rvm_ruby_string="$rvm_ruby_string-$rvm_ruby_patch_level"
|
22
|
-
[[ -n "$rvm_ruby_revision" ]] && rvm_ruby_string="$rvm_ruby_string-$rvm_ruby_revision"
|
23
|
-
[[ -n "$rvm_ruby_name" ]] && rvm_ruby_name="$rvm_ruby_string-n$rvm_ruby_name"
|
10
|
+
[[ -n "${rvm_ruby_interpreter:-""}" ]] && rvm_ruby_string="$rvm_ruby_interpreter"
|
11
|
+
[[ -n "${rvm_ruby_version:-""}" ]] && rvm_ruby_string="$rvm_ruby_string-$rvm_ruby_version"
|
12
|
+
[[ -n "${rvm_ruby_patch_level:-""}" ]] && rvm_ruby_string="$rvm_ruby_string-$rvm_ruby_patch_level"
|
13
|
+
[[ -n "${rvm_ruby_revision:-""}" ]] && rvm_ruby_string="$rvm_ruby_string-$rvm_ruby_revision"
|
14
|
+
[[ -n "${rvm_ruby_name:-""}" ]] && rvm_ruby_name="$rvm_ruby_string-n$rvm_ruby_name"
|
24
15
|
fi
|
25
16
|
|
26
17
|
__rvm_ruby_string
|
@@ -33,23 +24,23 @@ __rvm_select() {
|
|
33
24
|
|
34
25
|
rvm_ruby_package_name=${rvm_ruby_interpreter}-${rvm_ruby_version}
|
35
26
|
|
36
|
-
if [[ $rvm_head_flag -eq 1 ]] ; then
|
27
|
+
if [[ ${rvm_head_flag:-0} -eq 1 ]] ; then
|
37
28
|
rvm_ruby_version="" ; rvm_ruby_tag=""
|
38
29
|
rvm_ruby_revision="head"
|
39
30
|
__rvm_db "macruby_repo_url" "rvm_ruby_repo_url"
|
40
|
-
|
31
|
+
rvm_ruby_url="$rvm_ruby_repo_url"
|
41
32
|
|
42
|
-
elif [[ "nightly" = "$rvm_ruby_version" ]] ; then
|
43
|
-
__rvm_db "macruby_nightly_url" "
|
33
|
+
elif [[ "nightly" = "${rvm_ruby_version:-""}" ]] ; then
|
34
|
+
__rvm_db "macruby_nightly_url" "rvm_ruby_url"
|
44
35
|
rvm_ruby_package_name="${rvm_ruby_interpreter}_nightly-${rvm_ruby_version}"
|
45
36
|
rvm_ruby_package_file="$rvm_ruby_package_name"
|
46
37
|
|
47
38
|
else
|
48
39
|
__rvm_db "macruby_version" "rvm_ruby_version"
|
49
|
-
__rvm_db "macruby_url" "
|
40
|
+
__rvm_db "macruby_url" "rvm_ruby_url"
|
50
41
|
rvm_ruby_package_name="MacRuby%20${rvm_ruby_version}.zip"
|
51
42
|
rvm_ruby_package_file="$rvm_ruby_package_name"
|
52
|
-
|
43
|
+
rvm_ruby_url="$rvm_ruby_url/$rvm_ruby_package_name"
|
53
44
|
fi
|
54
45
|
rvm_ruby_patch_level=""
|
55
46
|
else
|
@@ -63,13 +54,13 @@ __rvm_select() {
|
|
63
54
|
rvm_ruby_version=${rvm_ruby_version:-$(__rvm_db "rbx_version")}
|
64
55
|
rvm_ruby_repo_url=${rvm_rbx_repo_url:-$(__rvm_db "rubinius_repo_url")}
|
65
56
|
|
66
|
-
if [[ $rvm_head_flag -eq 0 ]] ; then
|
57
|
+
if [[ ${rvm_head_flag:-0} -eq 0 ]] ; then
|
67
58
|
rvm_ruby_patch_level=${rvm_ruby_patch_level:-$(__rvm_db "rbx_patch_level")}
|
68
59
|
rvm_ruby_string="${rvm_ruby_string/-prc/-rc}"
|
69
60
|
rvm_ruby_string="$(echo "$rvm_ruby_string" | sed 's#-p*#-#')"
|
70
61
|
rvm_ruby_package_file="$(echo "rubinius-${rvm_ruby_version}-${rvm_ruby_patch_level}.${rvm_archive_extension}" | sed 's#-p*#-#' )"
|
71
|
-
__rvm_db "rbx_url" "
|
72
|
-
|
62
|
+
__rvm_db "rbx_url" "rvm_ruby_url"
|
63
|
+
rvm_ruby_url="$rvm_ruby_url/$rvm_ruby_package_file"
|
73
64
|
|
74
65
|
else
|
75
66
|
rvm_ruby_patch_level="" ; rvm_ruby_version=""
|
@@ -79,10 +70,10 @@ __rvm_select() {
|
|
79
70
|
jruby)
|
80
71
|
rvm_ruby_patch_level=""
|
81
72
|
|
82
|
-
if [[ $rvm_head_flag -eq 1 ]] ; then
|
73
|
+
if [[ ${rvm_head_flag:-0} -eq 1 ]] ; then
|
83
74
|
rvm_ruby_version="head"
|
84
75
|
rvm_ruby_repo_url="${rvm_ruby_repo_url:-$(__rvm_db "jruby_repo_url")}"
|
85
|
-
|
76
|
+
rvm_ruby_url="${rvm_ruby_repo_url:-$(__rvm_db "jruby_repo_url")}"
|
86
77
|
|
87
78
|
else
|
88
79
|
rvm_archive_extension="tar.gz"
|
@@ -90,7 +81,7 @@ __rvm_select() {
|
|
90
81
|
jruby_url="$(__rvm_db "jruby_url")"
|
91
82
|
rvm_ruby_package_file="${rvm_ruby_interpreter}-bin-${rvm_ruby_version}"
|
92
83
|
rvm_ruby_package_name="${rvm_ruby_interpreter}-${rvm_ruby_version}"
|
93
|
-
|
84
|
+
rvm_ruby_url="${jruby_url}/${rvm_ruby_version}/${rvm_ruby_package_file}.tar.gz"
|
94
85
|
jruby_url=""
|
95
86
|
fi
|
96
87
|
|
@@ -102,10 +93,10 @@ __rvm_select() {
|
|
102
93
|
rvm_ruby_patch_level=""
|
103
94
|
maglev_url="$(__rvm_db "maglev_url")"
|
104
95
|
|
105
|
-
if [[ $rvm_head_flag -eq 1 ]] ; then
|
96
|
+
if [[ ${rvm_head_flag:-0} -eq 1 ]] ; then
|
106
97
|
rvm_ruby_version="head"
|
107
98
|
rvm_ruby_repo_url="${rvm_ruby_repo_url:-$(__rvm_db "maglev_repo_url")}"
|
108
|
-
|
99
|
+
rvm_ruby_url="${rvm_ruby_repo_url:-$(__rvm_db "maglev_repo_url")}"
|
109
100
|
|
110
101
|
else
|
111
102
|
system="$(uname -s)"
|
@@ -114,7 +105,7 @@ __rvm_select() {
|
|
114
105
|
rvm_gemstone_package_file="GemStone-${rvm_ruby_version}.${system}-${arch}"
|
115
106
|
rvm_ruby_version="${rvm_ruby_version:-"$(__rvm_db "maglev_version")"}"
|
116
107
|
rvm_ruby_package_name="${rvm_ruby_interpreter}-${rvm_ruby_version}"
|
117
|
-
|
108
|
+
rvm_ruby_url="${rvm_ruby_url:-"$maglev_url/${rvm_ruby_package_file}.${rvm_archive_extension}"}"
|
118
109
|
rvm_gemstone_url="${rvm_gemstone_url:-"$maglev_url/${rvm_gemstone_package_file}.${rvm_archive_extension}"}"
|
119
110
|
export MAGLEV_HOME="$rvm_rubies_path/$rvm_ruby_string"
|
120
111
|
fi
|
@@ -127,35 +118,36 @@ __rvm_select() {
|
|
127
118
|
rvm_ruby_version="head"
|
128
119
|
rvm_ruby_package_name="${rvm_ruby_string}"
|
129
120
|
rvm_ruby_repo_url="${rvm_ruby_repo_url:-$(__rvm_db "ironruby_repo_url")}"
|
130
|
-
|
121
|
+
rvm_ruby_url="${rvm_ruby_repo_url:-$(__rvm_db "ironruby_repo_url")}"
|
131
122
|
|
132
123
|
else
|
133
124
|
rvm_archive_extension="zip"
|
134
125
|
rvm_ruby_version=${rvm_ruby_version:-"$(__rvm_db "ironruby_version")"}
|
135
126
|
rvm_ruby_package_name="${rvm_ruby_interpreter}-${rvm_ruby_version}"
|
136
127
|
rvm_ruby_package_file="${rvm_ruby_interpreter}-${rvm_ruby_version}.${rvm_archive_extension}"
|
137
|
-
|
128
|
+
rvm_ruby_url="$(__rvm_db "ironruby_${rvm_ruby_version}_url")${rvm_ruby_package_file}"
|
138
129
|
fi
|
139
130
|
|
140
|
-
export rvm_ruby_version rvm_ruby_string rvm_ruby_package_name rvm_ruby_repo_url
|
131
|
+
export rvm_ruby_version rvm_ruby_string rvm_ruby_package_name rvm_ruby_repo_url rvm_ruby_url rvm_archive_extension
|
141
132
|
;;
|
142
133
|
|
143
134
|
ree)
|
144
135
|
rvm_ruby_interpreter=ree
|
145
136
|
rvm_ruby_version=${rvm_ruby_version:-"$(__rvm_db "ree_version")"}
|
146
137
|
|
147
|
-
if [[
|
138
|
+
if [[ -n "${rvm_ruby_patch_level:-0}" ]] ; then
|
148
139
|
rvm_ruby_patch_level="$(echo $rvm_ruby_patch_level | sed 's#^p##')"
|
149
140
|
fi
|
150
141
|
|
151
|
-
if [[
|
152
|
-
|
142
|
+
if [[ ${rvm_head_flag:-0} -eq 0 ]] ; then
|
143
|
+
|
144
|
+
if [[ -n "${rvm_ruby_revision:-""}" ]] ; then
|
153
145
|
rvm_ruby_patch_level="" ; rvm_ruby_package_file=""
|
154
146
|
rvm_ruby_package_name="ree-$rvm_ruby_version-$rvm_ruby_revision"
|
155
147
|
|
156
148
|
else
|
157
149
|
rvm_ruby_package_file="ruby-enterprise-$rvm_ruby_version-$rvm_ruby_patch_level"
|
158
|
-
|
150
|
+
rvm_ruby_url="$(__rvm_db "${rvm_ruby_interpreter}_${rvm_ruby_version}_url")/$rvm_ruby_package_file.tar.gz"
|
159
151
|
fi
|
160
152
|
fi
|
161
153
|
|
@@ -170,7 +162,7 @@ __rvm_select() {
|
|
170
162
|
rvm_ruby_string=$(echo $rvm_ruby_string | sed -e 's/shyouhei/mput/g')
|
171
163
|
rvm_ruby_patch_level=""
|
172
164
|
rvm_ruby_repo_url=${rvm_mput_repo_url:-"$(__rvm_db "shyouhei_repo_url")"}
|
173
|
-
|
165
|
+
rvm_ruby_url=$rvm_ruby_repo_url
|
174
166
|
rvm_ruby_configure="" ; rvm_ruby_make="" ; rvm_ruby_make_install=""
|
175
167
|
;;
|
176
168
|
|
@@ -199,16 +191,16 @@ __rvm_select() {
|
|
199
191
|
;;
|
200
192
|
|
201
193
|
default|system|user)
|
202
|
-
#no-op?
|
194
|
+
# no-op?
|
203
195
|
;;
|
204
196
|
|
205
197
|
*)
|
206
|
-
if [[
|
198
|
+
if [[ -n "${MY_RUBY_HOME:-""}" ]] ; then
|
207
199
|
rvm_ruby_string=$(basename $MY_RUBY_HOME)
|
208
200
|
__rvm_select
|
209
201
|
|
210
202
|
else
|
211
|
-
if [[ -z "$rvm_ruby_string" ]] ; then
|
203
|
+
if [[ -z "${rvm_ruby_string:-""}" ]] ; then
|
212
204
|
"$rvm_scripts_path/log" "fail" "Ruby implementation '$rvm_ruby_interpreter' is not known."
|
213
205
|
return 1
|
214
206
|
fi
|
@@ -220,9 +212,9 @@ __rvm_select() {
|
|
220
212
|
if [[ -n "$rvm_ruby_interpreter" && "system" != "$rvm_ruby_interpreter" && "default" != "$rvm_ruby_interpreter" ]] ; then
|
221
213
|
|
222
214
|
if [[ ! -z "$rvm_ruby_version" ]] ; then
|
223
|
-
|
224
|
-
|
225
|
-
|
215
|
+
rvm_ruby_release_version="${rvm_ruby_version/.*/}"
|
216
|
+
rvm_ruby_major_version=${rvm_ruby_version%.*} ; rvm_ruby_major_version=${rvm_ruby_major_version#*.}
|
217
|
+
rvm_ruby_minor_version="${rvm_ruby_version//*.}"
|
226
218
|
fi
|
227
219
|
|
228
220
|
rvm_ruby_package_name="${rvm_ruby_package_name:-$(echo $rvm_ruby_string | sed -e 's/-n.*$//')}"
|
@@ -249,21 +241,18 @@ __rvm_select() {
|
|
249
241
|
|
250
242
|
\mkdir -p "$rvm_ruby_log_path"
|
251
243
|
|
252
|
-
export rvm_ruby_interpreter rvm_ruby_version rvm_ruby_repo_url rvm_ruby_package_name
|
244
|
+
export rvm_ruby_interpreter rvm_ruby_version rvm_ruby_repo_url rvm_ruby_package_name rvm_ruby_url rvm_ruby_patch_level rvm_ruby_configure rvm_ruby_configure_flags rvm_ruby_make rvm_ruby_make_install rvm_ruby_revision rvm_ruby_tag rvm_ruby_release_version rvm_ruby_major_version rvm_ruby_minor_version rvm_gemset_name rvm_gems_path rvm_ruby_gem_home rvm_path rvm_src_path rvm_bin_path rvm_ruby_binary rvm_ruby_home rvm_log_path rvm_ruby_log_path rvm_src_path rvm_ruby_src_path rvm_ruby_irbrc rvm_ruby_selected_flag rvm_ruby_string
|
253
245
|
else
|
254
246
|
rvm_ruby_interpreter="${rvm_ruby_interpreter:-system}"
|
255
247
|
fi
|
256
248
|
}
|
257
249
|
|
258
250
|
__rvm_use() {
|
259
|
-
|
260
|
-
rvm_ruby_selected_flag=${rvm_ruby_selected_flag:-0}
|
261
251
|
rvm_head_flag=${rvm_head_flag:-0}
|
262
252
|
rvm_default_flag=${rvm_default_flag:-0}
|
263
253
|
rvm_rvmrc_flag=${rvm_rvmrc_flag:-0}
|
264
254
|
rvm_verbose_flag=${rvm_verbose_flag:-0}
|
265
255
|
rvm_sticky_flag=${rvm_sticky_flag:-0}
|
266
|
-
rvm_ruby_interpreter="${rvm_ruby_interpreter:-""}"
|
267
256
|
rvm_gemset_name="${rvm_gemset_name:-""}"
|
268
257
|
rvm_ruby_gem_home="${rvm_ruby_gem_home:-""}"
|
269
258
|
rvm_wrapper_name="${rvm_wrapper_name:-""}"
|
@@ -271,9 +260,9 @@ __rvm_use() {
|
|
271
260
|
|
272
261
|
local new_path=""
|
273
262
|
|
274
|
-
if [[ $rvm_ruby_selected_flag -eq 0 ]] ; then __rvm_select "$@" ; fi
|
263
|
+
if [[ ${rvm_ruby_selected_flag:-0} -eq 0 ]] ; then __rvm_select "$@" ; fi
|
275
264
|
|
276
|
-
if [[ -z "$rvm_ruby_interpreter" ]] ; then rvm_ruby_interpreter="system" ; fi
|
265
|
+
if [[ -z "${rvm_ruby_interpreter:-""}" ]] ; then rvm_ruby_interpreter="system" ; fi
|
277
266
|
|
278
267
|
if [[ "system" = "$rvm_ruby_interpreter" ]] ; then
|
279
268
|
|
@@ -304,7 +293,7 @@ __rvm_use() {
|
|
304
293
|
done
|
305
294
|
fi
|
306
295
|
|
307
|
-
[[ ${rvm_verbose_flag:-0} -
|
296
|
+
[[ ${rvm_verbose_flag:-0} -gt 0 ]] && "$rvm_scripts_path/log" "info" "Now using system ruby."
|
308
297
|
|
309
298
|
export rvm_ruby_string="system"
|
310
299
|
|
@@ -333,7 +322,7 @@ __rvm_use() {
|
|
333
322
|
# Ensure the environment file for the selected ruby exists.
|
334
323
|
__rvm_ensure_has_environment_files
|
335
324
|
|
336
|
-
[[ ${rvm_verbose_flag:-0} -
|
325
|
+
[[ ${rvm_verbose_flag:-0} -gt 0 ]] && \
|
337
326
|
"$rvm_scripts_path/log" "info" "Using $(basename $GEM_HOME | \tr '-' ' ' | sed 's/'${rvm_gemset_separator}'/ with gemset /')"
|
338
327
|
|
339
328
|
new_path="$GEM_HOME/bin:$rvm_ruby_global_gems_path/bin:$MY_RUBY_HOME/bin:$rvm_bin_path:$(__rvm_remove_rvm_from_path ; printf "$PATH")"
|
@@ -429,9 +418,7 @@ __rvm_ruby_string() {
|
|
429
418
|
fi
|
430
419
|
|
431
420
|
# Alias'd rubies
|
432
|
-
if [[ ${rvm_expanding_aliases:-0} -eq 0 ]]; then
|
433
|
-
rvm_ruby_string="${rvm_ruby_string:-"default"}"
|
434
|
-
|
421
|
+
if [[ ${rvm_expanding_aliases:-0} -eq 0 && -n ${rvm_ruby_string:-""} ]]; then
|
435
422
|
if expanded_alias_name="$("$rvm_scripts_path/alias" show "$rvm_ruby_string" 2>/dev/null)" && [[ -n "$expanded_alias_name" ]] ; then
|
436
423
|
rvm_ruby_string="$expanded_alias_name"
|
437
424
|
|
@@ -714,7 +701,7 @@ __rvm_gemset_use() {
|
|
714
701
|
fi
|
715
702
|
fi
|
716
703
|
|
717
|
-
if [[ ${rvm_interactive_flag:-0} -
|
704
|
+
if [[ ${rvm_interactive_flag:-0} -gt 0 && ${rvm_verbose_flag:-1} -ne 0 ]] ; then
|
718
705
|
"$rvm_scripts_path/log" "info" "Now using gemset '${rvm_gemset_name:-default}'"
|
719
706
|
fi
|
720
707
|
|
@@ -731,9 +718,9 @@ __rvm_gemset_use() {
|
|
731
718
|
}
|
732
719
|
|
733
720
|
__rvm_gemset_clear() {
|
734
|
-
rvm_gemset_name="" ; shift
|
735
|
-
rvm_ruby_gem_home="$(echo "$GEM_HOME" | sed "s#${rvm_gemset_separator:-'@'}.*\$##g")"
|
736
|
-
rvm_ruby_global_gems_path="$(echo "$GEM_HOME" | sed 's/'${rvm_gemset_separator}'.*$//')${rvm_gemset_separator}global"
|
721
|
+
rvm_gemset_name="" ; shift # TODO: Is this shift necessary???
|
722
|
+
rvm_ruby_gem_home="$(echo "${GEM_HOME:-""}" | sed "s#${rvm_gemset_separator:-'@'}.*\$##g")"
|
723
|
+
rvm_ruby_global_gems_path="$(echo "${GEM_HOME:-""}" | sed 's/'${rvm_gemset_separator}'.*$//')${rvm_gemset_separator}global"
|
737
724
|
GEM_HOME=$rvm_ruby_gem_home
|
738
725
|
BUNDLE_PATH="$rvm_ruby_gem_home"
|
739
726
|
GEM_PATH="$rvm_ruby_gem_home/bin:$rvm_ruby_global_gems_path/bin"
|