rvm 0.0.97 → 0.0.98
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/README +1 -0
- data/binscripts/rvm-prompt +14 -6
- data/binscripts/rvmsudo +2 -0
- data/config/db +2 -2
- data/install +5 -3
- data/lib/VERSION.yml +1 -1
- data/rvm.gemspec +5 -5
- data/scripts/cli +7 -5
- data/scripts/completion +0 -1
- data/scripts/fetch +6 -6
- data/scripts/gems +10 -12
- data/scripts/initialize +5 -2
- data/scripts/install +5 -3
- data/scripts/libraries +7 -7
- data/scripts/manage +90 -74
- data/scripts/notes +11 -1
- data/scripts/rvm +1 -1
- data/scripts/rvm-install +5 -3
- data/scripts/selector +34 -17
- data/scripts/update +5 -3
- data/scripts/utility +7 -7
- metadata +3 -2
data/README
CHANGED
@@ -35,6 +35,7 @@ Implementation
|
|
35
35
|
jruby - JRuby
|
36
36
|
rbx - rubinius
|
37
37
|
ree - ruby Enterprise Edition
|
38
|
+
ironruby - IronRuby
|
38
39
|
mput - shyouhei(mput)'s github repository
|
39
40
|
system - use the system ruby (eg. pre-rvm state)
|
40
41
|
default - use rvm set default ruby and system if it hasn't been set.
|
data/binscripts/rvm-prompt
CHANGED
@@ -10,7 +10,7 @@ add(){
|
|
10
10
|
fi
|
11
11
|
}
|
12
12
|
|
13
|
-
if which ruby 2>/dev/null |
|
13
|
+
if [[ ! -z "$(which ruby 2>/dev/null | awk '/rvm/{print}')" ]] ; then
|
14
14
|
unset format
|
15
15
|
while [[ $# -gt 0 ]] ; do
|
16
16
|
token="$1" ; shift
|
@@ -31,11 +31,18 @@ if which ruby 2>/dev/null | grep -q 'rvm' ; then
|
|
31
31
|
fi
|
32
32
|
|
33
33
|
ruby_string=$(dirname "$(which ruby 2>/dev/null)" | xargs dirname | xargs basename)
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
34
|
+
if [[ ! -z "$interpreter_flag" ]] ; then
|
35
|
+
interpreter="$(echo $ruby_string | awk -F'-' '{print $1}')"
|
36
|
+
fi
|
37
|
+
if [[ ! -z "$version_flag" ]] ; then
|
38
|
+
version="$(echo $ruby_string | awk -F'-' '{print $2}')"
|
39
|
+
fi
|
40
|
+
if [[ ! -z "$patchlevel_flag" ]] ; then
|
41
|
+
patchlevel=$(echo $ruby_string | awk -F'-' '{print $3}')
|
42
|
+
fi
|
43
|
+
if [[ ! -z "$architecture_flag" ]] ; then
|
44
|
+
architecture="$(echo "$(ruby -v)" | sed 's/^.*\[//' | sed 's/\].*$//')"
|
45
|
+
fi
|
39
46
|
|
40
47
|
command="prompt=\"[$format]\""
|
41
48
|
eval "$command"
|
@@ -43,3 +50,4 @@ if which ruby 2>/dev/null | grep -q 'rvm' ; then
|
|
43
50
|
fi
|
44
51
|
|
45
52
|
exit 0
|
53
|
+
|
data/binscripts/rvmsudo
ADDED
data/config/db
CHANGED
@@ -22,8 +22,8 @@ ree_1.8.6_repo_url=git://github.com/FooBarWidget/rubyenterpriseedition.git
|
|
22
22
|
ree_1.8.7_url=http://rubyforge.org/frs/download.php/66162
|
23
23
|
ree_1.8.7_repo_url=git://github.com/FooBarWidget/rubyenterpriseedition187.git
|
24
24
|
ree_1.8.7_patch_level=2009.10
|
25
|
-
rbx_version=1.0.0
|
26
|
-
rbx_patch_level=
|
25
|
+
rbx_version=1.0.0
|
26
|
+
rbx_patch_level=rc1
|
27
27
|
rbx_url=http://asset.rubini.us/rubinius-1.0.0-rc1-20091125.tar.gz
|
28
28
|
ruby_1.9.1_patch_level=376
|
29
29
|
ruby_1.9.2_patch_level=preview1
|
data/install
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
if [[ -f /etc/rvmrc ]] ; then source /etc/rvmrc ; fi
|
4
4
|
if [[ -f "$HOME/.rvmrc" ]] ; then source "$HOME/.rvmrc" ; fi
|
5
5
|
|
6
|
-
if
|
6
|
+
if ! [[ "$rvm_path" =~ /rvm/?$ ]] ; then
|
7
7
|
unset rvm_path
|
8
8
|
if [[ "root" = "$(whoami)" ]] ; then
|
9
9
|
rvm_path="/usr/local/rvm"
|
@@ -12,6 +12,7 @@ if [[ ! -d "$rvm_path" ]] || [[ "$rvm_path" = "/" ]] ; then
|
|
12
12
|
fi
|
13
13
|
fi
|
14
14
|
|
15
|
+
source scripts/utility
|
15
16
|
source scripts/initialize
|
16
17
|
|
17
18
|
#
|
@@ -54,7 +55,7 @@ fi
|
|
54
55
|
echo -e "\n Installing bin scripts to $rvm_path/bin ..."
|
55
56
|
# Cleanse and purge...
|
56
57
|
rm -f $rvm_path/bin/rvm ; rm -rf $rvm_path/bin/binscripts
|
57
|
-
for file in rvm-prompt rvm ; do
|
58
|
+
for file in rvm-prompt rvm rvmsudo ; do
|
58
59
|
cp -f "$source_dir/binscripts/$file" $rvm_path/bin/
|
59
60
|
done
|
60
61
|
chmod +x $rvm_path/bin/*
|
@@ -68,7 +69,7 @@ if [[ "$rvm_loaded_flag" != "1" ]] ; then
|
|
68
69
|
if [[ ! -f $rcfile ]] ; then touch $rcfile ; fi
|
69
70
|
if [[ -s "$HOME/.profile" ]] ; then
|
70
71
|
if ! grep -q '.profile' "$rcfile" ; then
|
71
|
-
echo " Adding 'if [[ -s
|
72
|
+
echo " Adding 'if [[ -s \$HOME/.profile ]] ; then source \$HOME ; fi' to $rcfile."
|
72
73
|
echo -e "\n# rvm-install added line:\nif [[ -s \$HOME/.profile ]] ; then source \$HOME/.profile ; fi\n" >> $rcfile
|
73
74
|
fi
|
74
75
|
fi
|
@@ -81,6 +82,7 @@ fi
|
|
81
82
|
|
82
83
|
if [[ "root" = "$(whoami)" ]] ; then
|
83
84
|
echo -e "\n Symlinking rvm to $rvm_symlink_path/rvm ..."
|
85
|
+
mkdir -p $rvm_symlink_path
|
84
86
|
ln -nfs $rvm_path/bin/rvm $rvm_symlink_path/rvm
|
85
87
|
chmod +x $rvm_symlink_path/rvm
|
86
88
|
fi
|
data/lib/VERSION.yml
CHANGED
data/rvm.gemspec
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
4
4
|
# -*- encoding: utf-8 -*-
|
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.98"
|
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-12-
|
12
|
+
s.date = %q{2009-12-21}
|
13
13
|
s.default_executable = %q{rvm-install}
|
14
14
|
s.description = %q{Manages Ruby interpreter installations and switching between them.}
|
15
15
|
s.email = %q{wayneeseguin@gmail.com}
|
@@ -22,6 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
"README",
|
23
23
|
"binscripts/rvm",
|
24
24
|
"binscripts/rvm-prompt",
|
25
|
+
"binscripts/rvmsudo",
|
25
26
|
"config/db",
|
26
27
|
"config/md5",
|
27
28
|
"examples/rvmrc",
|
@@ -89,4 +90,3 @@ Gem::Specification.new do |s|
|
|
89
90
|
else
|
90
91
|
end
|
91
92
|
end
|
92
|
-
|
data/scripts/cli
CHANGED
@@ -49,7 +49,7 @@ __rvm_parse_args() {
|
|
49
49
|
rvm_ruby_string="$rvm_token"
|
50
50
|
;;
|
51
51
|
|
52
|
-
jruby|ree|macruby|rbx|rubinius|mput|shyouhei|default|all)
|
52
|
+
jruby|ree|macruby|rbx|rubinius|mput|shyouhei|ironruby|default|all)
|
53
53
|
rvm_ruby_interpreter="$rvm_token"
|
54
54
|
rvm_ruby_string="$rvm_token"
|
55
55
|
rvm_action="${rvm_action:-use}"
|
@@ -110,7 +110,7 @@ __rvm_parse_args() {
|
|
110
110
|
rvm_ruby_version=$(echo "$1" | tr ',' ' ') ; shift
|
111
111
|
unset rvm_ruby_interpreter
|
112
112
|
else
|
113
|
-
if $rvm_scripts_path/match "rbx jruby
|
113
|
+
if $rvm_scripts_path/match "ruby rbx jruby macruby ree rubinius mput shyouhei ironruby" "$1" ; then
|
114
114
|
rvm_ruby_interpreter=$1 ; shift
|
115
115
|
else
|
116
116
|
unset rvm_ruby_interpreter rvm_ruby_version
|
@@ -266,8 +266,10 @@ __rvm_parse_args() {
|
|
266
266
|
tests|specs) rvm_action="tests" ;;
|
267
267
|
--trace) export rvm_trace_flag=1 ; set -x ;;
|
268
268
|
--symlink) rvm_symlink_name="$1" ; shift ;;
|
269
|
+
--disable-llvm|--disable-jit) export rvm_jit_flag=0 ;;
|
270
|
+
--enable-llvm|--enable-jit) export rvm_jit_flag=1 ;;
|
269
271
|
|
270
|
-
--self|--gem|--rubygems|--reconfigure|--default|--debug|--force|--all|--dump|--summary|--
|
272
|
+
--self|--gem|--rubygems|--reconfigure|--default|--debug|--force|--all|--dump|--summary|--latest|--yaml|--json|--archive|--shebang|--env|--path|--tail|--delete|--verbose|--load|--passenger|--editor)
|
271
273
|
export rvm_$(echo $rvm_token | sed 's#-##g')_flag=1
|
272
274
|
if [[ "--debug" = "$rvm_token" ]] ; then export rvm_debug_flag ; fi
|
273
275
|
;;
|
@@ -428,9 +430,9 @@ rvm() {
|
|
428
430
|
result=1
|
429
431
|
esac
|
430
432
|
|
431
|
-
if [[ "$rvm_reload_flag"
|
433
|
+
if [[ ! -z "$rvm_reload_flag" ]] ; then source "$rvm_path/scripts/rvm" ; fi
|
432
434
|
|
433
|
-
if [[ "$rvm_trace_flag"
|
435
|
+
if [[ ! -z "$rvm_trace_flag" ]] ; then set +x ; unset rvm_trace_flag ; fi
|
434
436
|
|
435
437
|
return $result
|
436
438
|
}
|
data/scripts/completion
CHANGED
data/scripts/fetch
CHANGED
@@ -13,22 +13,22 @@ if [[ -z "$1" ]] ; then $rvm_scripts_path/log "fail" "BUG: $0 called without an
|
|
13
13
|
|
14
14
|
archive=$(basename "$1") ; downlaod=1
|
15
15
|
|
16
|
-
|
16
|
+
if [[ ! -z "$rvm_debug_flag" ]] ; then $rvm_scripts_path/log "debug" "Fetching $archive" ; fi
|
17
17
|
|
18
18
|
# Check first if we have the correct archive
|
19
19
|
archive_md5="$($rvm_scripts_path/db "$rvm_config_path/md5" "$archive")"
|
20
20
|
if [[ -e "$archive" ]] && [[ ! -z "$archive_md5" ]] ; then
|
21
|
-
|
21
|
+
if [[ ! -z "$rvm_debug_flag" ]] ; then $rvm_scripts_path/log "debug" "Found archive and its md5, testing correctness" ; fi
|
22
22
|
if [[ $($rvm_scripts_path/md5 $archive $archive_md5) -gt 0 ]] ; then
|
23
|
-
|
23
|
+
if [[ ! -z "$rvm_debug_flag" ]] ; then $rvm_scripts_path/log "debug" "Archive is bad, downloading" ; fi
|
24
24
|
download=1
|
25
25
|
else
|
26
|
-
|
26
|
+
if [[ ! -z "$rvm_debug_flag" ]] ; then $rvm_scripts_path/log "debug" "Archive is good, not downloading" ; fi
|
27
27
|
download=0
|
28
28
|
result=0
|
29
29
|
fi ; unset archive_md5
|
30
30
|
else
|
31
|
-
|
31
|
+
if [[ ! -z "$rvm_debug_flag" ]] ; then $rvm_scripts_path/log "debug" "No archive or no MD5, downloading" ; fi
|
32
32
|
download=1
|
33
33
|
fi
|
34
34
|
|
@@ -44,7 +44,7 @@ if [[ $download -gt 0 ]] ; then
|
|
44
44
|
rm -f "$archive"
|
45
45
|
retry=1
|
46
46
|
elif [[ $result -eq 33 ]] ; then
|
47
|
-
|
47
|
+
if [[ ! -z "$rvm_debug_flag" ]] ; then $rvm_scripts_path/log "debug" "Server does not support 'range' command, removing '$archive'" ; fi
|
48
48
|
rm -f "$archive"
|
49
49
|
retry=1
|
50
50
|
else
|
data/scripts/gems
CHANGED
@@ -22,7 +22,7 @@ __rvm_gems_dir() {
|
|
22
22
|
|
23
23
|
__rvm_gems_list() {
|
24
24
|
if [[ $rvm_dir =~ rvm ]] ; then
|
25
|
-
for gemdir in $rvm_gem_path/$
|
25
|
+
for gemdir in "${rvm_gem_path}"/${rvm_ruby_string}%* ; do
|
26
26
|
echo "$gemdir" | awk -F'%' '{print $2}'
|
27
27
|
done
|
28
28
|
fi
|
@@ -30,7 +30,7 @@ __rvm_gems_list() {
|
|
30
30
|
|
31
31
|
__rvm_gems_delete() {
|
32
32
|
if [[ ! -z "$rvm_gem_set_name" ]] ; then
|
33
|
-
gemdir="$rvm_gem_path/$
|
33
|
+
gemdir="$rvm_gem_path/$rvm_ruby_string%$rvm_gem_set_name"
|
34
34
|
if [[ -d "$gemdir" ]] && [[ ! -z "$rvm_force_flag" ]] ; then
|
35
35
|
rm -rf "$gemdir"
|
36
36
|
elif [[ -d "$gemdir" ]] ; then
|
@@ -64,9 +64,10 @@ __rvm_gems_dump() {
|
|
64
64
|
fi
|
65
65
|
fi
|
66
66
|
|
67
|
+
$rvm_scripts_path/log "info" "Dumping current environments gems to $rvm_file_name"
|
68
|
+
|
67
69
|
touch $rvm_file_name
|
68
70
|
echo "# $rvm_file_name generated gem dump file. Note that any env variable settings will be missing. Append these after using a ';' field separator" > $rvm_file_name
|
69
|
-
|
70
71
|
for gem in $(gem list | sed 's#[\(|\)]##g' | sed 's#, #,#g' | tr ' ' ';') ; do
|
71
72
|
name="$(echo $gem | awk -F';' '{print $1}')"
|
72
73
|
if [[ -z "$rvm_latest_flag" ]] ; then
|
@@ -114,8 +115,7 @@ __rvm_gems_load() {
|
|
114
115
|
|
115
116
|
while read -r line
|
116
117
|
do # Keep this on 2nd line :(
|
117
|
-
|
118
|
-
__rvm_gem_install
|
118
|
+
__rvm_gem_install $line
|
119
119
|
done < <(awk '/^[\.\/a-zA-Z]/{print}' "$rvm_file_name")
|
120
120
|
else
|
121
121
|
$rvm_scripts_path/log "error" "$rvm_file_name does not exist to load from."
|
@@ -156,7 +156,7 @@ __rvm_parse_gem_line() {
|
|
156
156
|
__rvm_gem_install() {
|
157
157
|
__rvm_parse_gem_line $*
|
158
158
|
|
159
|
-
installed_gem="$(ls ${rvm_ruby_gem_home}/specifications/${gem_file_name}spec 2>/dev/null | head -n 1)"
|
159
|
+
installed_gem="$(ls ${rvm_ruby_gem_home}/specifications/${gem_file_name}*spec 2>/dev/null | head -n 1)"
|
160
160
|
if [[ -z "$rvm_force_flag" ]] && [[ -f "$installed_gem" ]] ; then
|
161
161
|
unset gem
|
162
162
|
$rvm_scripts_path/log "info" "$color_green$gem_name $gem_version$yellow exists, skipping (--force to re-install)"
|
@@ -202,19 +202,17 @@ __rvm_gem_install() {
|
|
202
202
|
# TODO: Set vars if fourth field is non-empty (means that there are conditional statements to execute in the gem install line.
|
203
203
|
if [[ "rvm_make_flags_flag" -eq 1 ]] ; then __rvm_make_flags ; fi
|
204
204
|
|
205
|
-
$rvm_scripts_path/log "warn" "$gem_name $gem_version is not installed, installing..."
|
206
205
|
if [[ ! -z "$rvm_ruby_gem_home" ]] ; then
|
207
|
-
command="GEM_HOME='$rvm_ruby_gem_home' GEM_PATH='$rvm_ruby_gem_home' $gem_prefix
|
206
|
+
command="GEM_HOME='$rvm_ruby_gem_home' GEM_PATH='$rvm_ruby_gem_home' $gem_prefix gem install --no-rdoc --no-ri -q $gem $gem_postfix $vars"
|
208
207
|
else
|
209
|
-
command="$gem_prefix
|
208
|
+
command="$gem_prefix gem install --no-rdoc --no-ri -q $gem $gem_postfix $vars"
|
210
209
|
fi
|
211
|
-
|
212
|
-
eval $command >> "$rvm_path/log/$rvm_ruby_string/gem.install.log" 2>> "$rvm_path/log/$rvm_ruby_string/gem.install.error.log"
|
210
|
+
__rvm_run "gem.install" "$command" "$gem_name $gem_version is not installed, installing..."
|
213
211
|
result=$?
|
214
212
|
if [[ $result -eq 0 ]] ; then
|
215
213
|
$rvm_scripts_path/log "info" "$color_green$gem_name $gem_version$color_none installed."
|
216
214
|
else
|
217
|
-
$rvm_scripts_path/log "error" "$color_red$gem_name $gem_version$color_none failed to install, output logged to
|
215
|
+
$rvm_scripts_path/log "error" "$color_red$gem_name $gem_version$color_none failed to install, output has been logged to:\n$rvm_path/log/$rvm_ruby_string/gem.install.error.log"
|
218
216
|
fi
|
219
217
|
fi ; unset gem gem_prefix gem_name gem_version gem_file_name gem_postfix cache_file gem_file_name gem_string
|
220
218
|
return $result
|
data/scripts/initialize
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
3
|
if [[ "root" = "$(whoami)" ]] ; then
|
4
|
-
rvm_rc_files="/etc/profile /etc/zshenv"
|
4
|
+
rvm_rc_files="${rvm_rc_files:-"/etc/profile /etc/zshenv"}"
|
5
5
|
else
|
6
|
-
rvm_rc_files="$HOME/.bash_profile $HOME/.bashrc $HOME/.
|
6
|
+
rvm_rc_files="${rvm_rc_files:-"$HOME/.bash_profile $HOME/.bashrc $HOME/.zshenv"}"
|
7
7
|
fi
|
8
8
|
|
9
9
|
if [[ ! -z "$rvm_archflags" ]] ; then rvm_make_flags_flag=1 ; fi
|
10
10
|
|
11
11
|
rvm_project_rvmrc="${rvm_project_rvmrc:-1}"
|
12
12
|
rvm_project_rvmrc_default="${rvm_project_rvmrc_default:-0}"
|
13
|
+
|
13
14
|
if [[ -z "$rvm_scripts_path" ]] ; then
|
14
15
|
if [[ -d "$HOME/scripts" ]] && [[ -f "/usr/local/rvm/scripts/rvm" ]]; then
|
15
16
|
rvm_scripts_path="$HOME/scripts"
|
@@ -19,6 +20,7 @@ if [[ -z "$rvm_scripts_path" ]] ; then
|
|
19
20
|
rvm_scripts_path="$rvm_path/scripts"
|
20
21
|
fi
|
21
22
|
fi
|
23
|
+
|
22
24
|
rvm_archives_path="${rvm_archives_path:-"$rvm_path/archives"}"
|
23
25
|
rvm_src_path="${rvm_src_path:-"$rvm_path/src"}"
|
24
26
|
rvm_log_path="${rvm_log_path:-"$rvm_path/log"}"
|
@@ -31,3 +33,4 @@ rvm_symlink_path="${rvm_symlink_path:-/usr/local/bin}"
|
|
31
33
|
|
32
34
|
export rvm_path rvm_scripts_path rvm_archives_path rvm_src_path rvm_log_path rvm_bin_path rvm_gem_path rvm_config_path rvm_tmp_path
|
33
35
|
|
36
|
+
__rvm_initialize
|
data/scripts/install
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
if [[ -f /etc/rvmrc ]] ; then source /etc/rvmrc ; fi
|
4
4
|
if [[ -f "$HOME/.rvmrc" ]] ; then source "$HOME/.rvmrc" ; fi
|
5
5
|
|
6
|
-
if
|
6
|
+
if ! [[ "$rvm_path" =~ /rvm/?$ ]] ; then
|
7
7
|
unset rvm_path
|
8
8
|
if [[ "root" = "$(whoami)" ]] ; then
|
9
9
|
rvm_path="/usr/local/rvm"
|
@@ -12,6 +12,7 @@ if [[ ! -d "$rvm_path" ]] || [[ "$rvm_path" = "/" ]] ; then
|
|
12
12
|
fi
|
13
13
|
fi
|
14
14
|
|
15
|
+
source scripts/utility
|
15
16
|
source scripts/initialize
|
16
17
|
|
17
18
|
#
|
@@ -54,7 +55,7 @@ fi
|
|
54
55
|
echo -e "\n Installing bin scripts to $rvm_path/bin ..."
|
55
56
|
# Cleanse and purge...
|
56
57
|
rm -f $rvm_path/bin/rvm ; rm -rf $rvm_path/bin/binscripts
|
57
|
-
for file in rvm-prompt rvm ; do
|
58
|
+
for file in rvm-prompt rvm rvmsudo ; do
|
58
59
|
cp -f "$source_dir/binscripts/$file" $rvm_path/bin/
|
59
60
|
done
|
60
61
|
chmod +x $rvm_path/bin/*
|
@@ -68,7 +69,7 @@ if [[ "$rvm_loaded_flag" != "1" ]] ; then
|
|
68
69
|
if [[ ! -f $rcfile ]] ; then touch $rcfile ; fi
|
69
70
|
if [[ -s "$HOME/.profile" ]] ; then
|
70
71
|
if ! grep -q '.profile' "$rcfile" ; then
|
71
|
-
echo " Adding 'if [[ -s
|
72
|
+
echo " Adding 'if [[ -s \$HOME/.profile ]] ; then source \$HOME ; fi' to $rcfile."
|
72
73
|
echo -e "\n# rvm-install added line:\nif [[ -s \$HOME/.profile ]] ; then source \$HOME/.profile ; fi\n" >> $rcfile
|
73
74
|
fi
|
74
75
|
fi
|
@@ -81,6 +82,7 @@ fi
|
|
81
82
|
|
82
83
|
if [[ "root" = "$(whoami)" ]] ; then
|
83
84
|
echo -e "\n Symlinking rvm to $rvm_symlink_path/rvm ..."
|
85
|
+
mkdir -p $rvm_symlink_path
|
84
86
|
ln -nfs $rvm_path/bin/rvm $rvm_symlink_path/rvm
|
85
87
|
chmod +x $rvm_symlink_path/rvm
|
86
88
|
fi
|
data/scripts/libraries
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
# ruby supporting libraries:
|
5
5
|
#
|
6
6
|
__rvm_readline_install() {
|
7
|
-
|
7
|
+
if [[ ! -z "$rvm_make_flags_flag" ]] ; then __rvm_make_flags ; fi
|
8
8
|
__rvm_pushpop $rvm_src_path
|
9
9
|
package="readline" ; version="5.2" ; archive_format="tar.gz"
|
10
10
|
# TODO: Figure out how to list, grab and apply the patches
|
@@ -35,7 +35,7 @@ __rvm_readline_install() {
|
|
35
35
|
}
|
36
36
|
|
37
37
|
__rvm_iconv_install() {
|
38
|
-
|
38
|
+
if [[ ! -z "$rvm_make_flags_flag" ]] ; then __rvm_make_flags ; fi
|
39
39
|
__rvm_pushpop $rvm_src_path
|
40
40
|
__rvm_pushpop $rvm_src_path
|
41
41
|
package="libiconv" ; version=1.13.1 ; archive_format="tar.gz"
|
@@ -54,7 +54,7 @@ __rvm_iconv_install() {
|
|
54
54
|
}
|
55
55
|
|
56
56
|
__rvm_curl_install() {
|
57
|
-
|
57
|
+
if [[ ! -z "$rvm_make_flags_flag" ]] ; then __rvm_make_flags ; fi
|
58
58
|
__rvm_pushpop $rvm_src_path
|
59
59
|
package="curl" ; version=7.19.7 ; archive_format="tar.gz"
|
60
60
|
$rvm_scripts_path/log "info" "Retrieving $package-$version.$archive_format"
|
@@ -72,7 +72,7 @@ __rvm_curl_install() {
|
|
72
72
|
}
|
73
73
|
|
74
74
|
__rvm_openssl_install() {
|
75
|
-
|
75
|
+
if [[ ! -z "$rvm_make_flags_flag" ]] ; then __rvm_make_flags ; fi
|
76
76
|
if $rvm_scripts_path/match "$rvm_archflags" "x86_64" ; then
|
77
77
|
openssl_os="os/compiler darwin64-x86_64-cc"
|
78
78
|
else
|
@@ -95,7 +95,7 @@ __rvm_openssl_install() {
|
|
95
95
|
}
|
96
96
|
|
97
97
|
__rvm_zlib_install() {
|
98
|
-
|
98
|
+
if [[ ! -z "$rvm_make_flags_flag" ]] ; then __rvm_make_flags ; fi
|
99
99
|
__rvm_pushpop $rvm_src_path
|
100
100
|
package="zlib" ; version="1.2.3" ; archive_format="tar.gz"
|
101
101
|
$rvm_scripts_path/log "info" "Retrieving $package-$version.$archive_format"
|
@@ -113,7 +113,7 @@ __rvm_zlib_install() {
|
|
113
113
|
}
|
114
114
|
|
115
115
|
__rvm_ncurses_install() {
|
116
|
-
|
116
|
+
if [[ ! -z "$rvm_make_flags_flag" ]] ; then __rvm_make_flags ; fi
|
117
117
|
__rvm_pushpop $rvm_src_path
|
118
118
|
package="ncurses" ; version="5.7" ; archive_format="tar.gz"
|
119
119
|
$rvm_scripts_path/log "info" "Retrieving $package"
|
@@ -131,7 +131,7 @@ __rvm_ncurses_install() {
|
|
131
131
|
}
|
132
132
|
|
133
133
|
__rvm_install_llvm() {
|
134
|
-
|
134
|
+
if [[ ! -z "$rvm_make_flags_flag" ]] ; then __rvm_make_flags ; fi
|
135
135
|
builtin cd "$rvm_src_path"
|
136
136
|
if [[ ! -d "$rvm_src_path/llvm/.svn" ]] ; then
|
137
137
|
rm -rf "$rvm_src_path/llvm"
|
data/scripts/manage
CHANGED
@@ -1,16 +1,19 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
|
-
if [[ ! -z "$rvm_trace_flag" ]] ; then set -x ; export rvm_trace_flag ; fi
|
4
|
-
|
5
3
|
original_ruby_version=$rvm_ruby_version
|
6
4
|
original_ruby_string=$rvm_ruby_string
|
7
5
|
|
8
|
-
source $rvm_scripts_path/
|
6
|
+
source $rvm_scripts_path/initialize
|
7
|
+
source $rvm_scripts_path/utility
|
8
|
+
source $rvm_scripts_path/selector
|
9
9
|
|
10
10
|
trap "rm -f $rvm_path/tmp/$$* > /dev/null 2>&1 ; exit" 0 1 2 3 15
|
11
11
|
|
12
|
+
if [[ ! -z "$rvm_trace_flag" ]] ; then set -x ; export rvm_trace_flag ; fi
|
13
|
+
|
12
14
|
__rvm_install_source() {
|
13
|
-
|
15
|
+
if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select ; fi
|
16
|
+
|
14
17
|
$rvm_scripts_path/log "info" "Installing Ruby from source to: $rvm_ruby_home"
|
15
18
|
mkdir -p "$rvm_ruby_log_path"
|
16
19
|
__rvm_pushpop "$rvm_src_path"
|
@@ -77,8 +80,7 @@ __rvm_install_source() {
|
|
77
80
|
}
|
78
81
|
|
79
82
|
__rvm_install_ruby() {
|
80
|
-
|
81
|
-
(( $rvm_ruby_selected_flag )) || __rvm_select $*
|
83
|
+
if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select ; fi
|
82
84
|
|
83
85
|
if [[ ! -z "$RUBYOPT" ]] ; then ruby_options="$RUBYOPT" ; unset RUBYOPT ; fi
|
84
86
|
|
@@ -191,10 +193,12 @@ RubyWrapper
|
|
191
193
|
rbx|rubinius)
|
192
194
|
$rvm_scripts_path/log "info" "Installing pre-requisites"
|
193
195
|
# prereqs, 1.8.6+ + rake. Yes this could all be one line... not pushing our luck.
|
194
|
-
|
196
|
+
original_string="$rvm_ruby_string"
|
197
|
+
export rvm_install_on_use_flag=1 ; $rvm_bin_path/rvm 1.8.7 --install # This should install if missing.
|
195
198
|
# TODO: use 'rvm gems load' here:
|
196
199
|
unset CFLAGS LDFLAGS ARCHFLAGS # Important.
|
197
|
-
__rvm_unset_ruby_variables ; rvm_ruby_string="
|
200
|
+
__rvm_unset_ruby_variables ; rvm_ruby_string="$original_string" ; __rvm_select
|
201
|
+
unset original_string
|
198
202
|
|
199
203
|
unset GEM_HOME GEM_PATH MY_RUBY_HOME IRBRC
|
200
204
|
PATH=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
|
@@ -205,8 +209,8 @@ RubyWrapper
|
|
205
209
|
$rvm_scripts_path/log "info" "Downloading $rvm_ruby_file, this may take a while depending on your connection..."
|
206
210
|
$rvm_scripts_path/fetch "$rvm_url" || (result=$? && return $result)
|
207
211
|
fi
|
208
|
-
__rvm_run "extract" "tar xzf $rvm_archives_path/$
|
209
|
-
mv $rvm_src_path/rubinius-$rvm_ruby_version $rvm_ruby_src_path
|
212
|
+
__rvm_run "extract" "tar xzf $rvm_archives_path/$(basename $rvm_url) -C $rvm_src_path" "Extracting $(basename $rvm_url) ..." || (result=$? && return $result)
|
213
|
+
mv "$rvm_src_path/rubinius-$rvm_ruby_version-${rvm_ruby_patch_level/^p//}" $rvm_ruby_src_path
|
210
214
|
else
|
211
215
|
__rvm_db "rubinius_repo_url" "rvm_ruby_repo_url"
|
212
216
|
#rvm_ruby_home="$rvm_path/$rvm_ruby_interpreter-$rvm_ruby_version"
|
@@ -224,73 +228,55 @@ RubyWrapper
|
|
224
228
|
# __rvm_run "rake.distclean" "\$(rvm 1.8.7 ; rake distclean --trace)" "Running distclean."
|
225
229
|
#fi
|
226
230
|
|
227
|
-
# For Installer, can do this once it's ready:
|
228
|
-
# RBX_PREFIX="$rvm_ruby_home" ; export RBX_PREFIX
|
229
|
-
# Also see 'rakelib/configuration.rake'
|
230
|
-
|
231
231
|
builtin cd "$rvm_ruby_src_path"
|
232
|
-
|
233
|
-
rvm_ruby_configure="./configure --prefix=$rvm_ruby_home
|
234
|
-
|
235
|
-
if [[
|
232
|
+
chmod +x ./configure
|
233
|
+
rvm_ruby_configure="./configure --prefix=$rvm_ruby_home" ; message="Configuring rbx"
|
234
|
+
|
235
|
+
if [[ "$rvm_jit_flag" -eq 0 ]] && [[ "rc1" != "$rvm_ruby_patch_level" ]] ; then
|
236
|
+
rvm_ruby_configure="$rvm_ruby_configure --disable-llvm" ; message="$message with LLVM disabled"
|
237
|
+
else
|
236
238
|
rvm_ruby_configure="$rvm_ruby_configure" ; message="$message with LLVM enabled"
|
237
239
|
fi
|
240
|
+
|
238
241
|
__rvm_run "configure" "$rvm_ruby_configure" "$message"
|
239
242
|
|
240
243
|
if [[ "$rvm_trace_flag" -eq 1 ]] ; then
|
241
|
-
rvm_ruby_make="
|
244
|
+
rvm_ruby_make="$rvm_bin_path/rvm 1.8.7 rake install --trace" ; message="Compiling rbx"
|
242
245
|
else
|
243
|
-
rvm_ruby_make="
|
246
|
+
rvm_ruby_make="$rvm_bin_path/rvm 1.8.7 rake install" ; message="Compiling rbx"
|
244
247
|
fi
|
245
248
|
__rvm_run "rake" "$rvm_ruby_make" "$message"
|
246
249
|
|
247
|
-
# TODO: Uncomment the following once --prefix is working properly again
|
248
|
-
#rvm_ruby_make_install="\$(rvm 1.8.7 ; rake install --trace)" ; message="Installing rbx"
|
249
|
-
#__rvm_run "rake.install" "$rvm_ruby_make" "$message"
|
250
|
-
|
251
250
|
binaries="ruby irb" # Trick to work in more shells :)
|
252
251
|
for binary_name in $(echo $binaries) ; do
|
253
252
|
ln -fs $rvm_ruby_home/bin/rbx $rvm_ruby_home/bin/$binary_name
|
254
253
|
done ; unset binary_name binaries
|
255
254
|
|
256
|
-
|
257
|
-
|
255
|
+
for binary_name in "gem" ; do
|
256
|
+
if [[ $binary_name != "gem" ]] ; then prefix="-S " ; else unset prefix; fi
|
258
257
|
|
259
|
-
binaries="gem" # Trick to work in more shells :)
|
260
|
-
for binary_name in $(echo $binaries); do
|
261
|
-
if [[ $binary_name != "gem" ]] ; then prefix="-S" ; fi
|
262
258
|
ruby_wrapper=$(cat <<RubyWrapper
|
263
|
-
#!/bin/bash
|
259
|
+
#!/usr/bin/env bash
|
264
260
|
|
265
261
|
GEM_HOME="$rvm_ruby_gem_home" ; export GEM_HOME
|
266
262
|
GEM_PATH="$rvm_ruby_gem_home" ; export GEM_PATH
|
267
263
|
MY_RUBY_HOME="$rvm_ruby_home" ; export MY_RUBY_HOME
|
268
264
|
PATH="$rvm_ruby_home/bin:$rvm_ruby_gem_home/bin:\$PATH" ; export PATH
|
269
265
|
|
270
|
-
exec $rvm_ruby_home/bin/rbx $prefix
|
266
|
+
exec $rvm_ruby_home/bin/rbx $prefix$binary_name "\$@"
|
271
267
|
RubyWrapper
|
272
268
|
)
|
273
|
-
|
274
|
-
for file_name in $(echo $files) ; do
|
269
|
+
for file_name in "$rvm_ruby_home/bin/$binary_name" "$rvm_path/bin/$binary_name-$rvm_ruby_string" ; do
|
275
270
|
rm -f $file_name
|
276
271
|
echo "$ruby_wrapper" > $file_name
|
277
272
|
if [[ -f $file_name ]] ; then chmod +x $file_name ; fi
|
278
|
-
done
|
279
|
-
unset ruby_wrapper binary_name files prefix
|
280
|
-
done
|
273
|
+
done
|
281
274
|
|
282
|
-
|
283
|
-
|
284
|
-
binary=rake
|
285
|
-
if [[ -f $rvm_ruby_gem_home/bin/$binary ]] ; then
|
286
|
-
if [[ "$rvm_ruby_gem_home" != "$rvm_ruby_home" ]] ; then
|
287
|
-
cp $rvm_ruby_gem_home/bin/$binary $rvm_ruby_home/bin/$binary
|
288
|
-
fi
|
289
|
-
chmod +x $rvm_ruby_home/bin/$binary
|
290
|
-
__rvm_inject_ruby_shebang "$rvm_ruby_home/bin/$binary"
|
291
|
-
__rvm_inject_gem_env "$rvm_ruby_home/bin/$binary"
|
292
|
-
fi ; unset binary
|
275
|
+
unset file_name binaries ruby_wrapper binary_name files prefix
|
276
|
+
done ; unset binary_name
|
293
277
|
|
278
|
+
binaries="erb ri rdoc"
|
279
|
+
__rvm_post_install
|
294
280
|
__rvm_irbrc
|
295
281
|
__rvm_bin_script
|
296
282
|
;;
|
@@ -300,16 +286,17 @@ RubyWrapper
|
|
300
286
|
echo -e "java must be installed and in your path in order to install JRuby." ; return 1
|
301
287
|
fi
|
302
288
|
|
303
|
-
mkdir -p "$rvm_ruby_log_path"
|
289
|
+
mkdir -p "$rvm_ruby_log_path" "$rvm_ruby_src_path"
|
304
290
|
__rvm_pushpop $rvm_src_path
|
305
291
|
__rvm_fetch_ruby || (result=$? && return $result)
|
306
|
-
|
292
|
+
|
293
|
+
# if [[ -z "$rvm_head_flag" ]] ; then __rvm_run "extract" "tar xzf $rvm_archives_path/$rvm_ruby_package_file.tar.gz -C $rvm_src_path" "Extracting $rvm_ruby_package_file ..." ; fi
|
307
294
|
|
308
295
|
builtin cd "$rvm_ruby_src_path"
|
309
|
-
|
296
|
+
if [[ ! -z "$rvm_head_flag" ]] ; then __rvm_run "ant.dist" "ant dist" "Running 'ant dist' (this could take a few minutes) ..." ; fi
|
310
297
|
|
311
298
|
mkdir -p "$rvm_ruby_home/bin/"
|
312
|
-
__rvm_run "nailgun" "builtin cd "$rvm_ruby_src_path/tool/nailgun" && ./configure --prefix=$rvm_ruby_home && make $rvm_make_flags"
|
299
|
+
__rvm_run "nailgun" "builtin cd \"$rvm_ruby_src_path/tool/nailgun\" && ./configure --prefix=$rvm_ruby_home && make $rvm_make_flags" "Building Nailgun"
|
313
300
|
|
314
301
|
__rvm_pushpop
|
315
302
|
|
@@ -342,13 +329,46 @@ RubyWrapper
|
|
342
329
|
echo -e "mono must be installed and in your path in order to install IronRuby." ; return 1
|
343
330
|
fi
|
344
331
|
|
345
|
-
|
346
|
-
|
332
|
+
if [[ "$rvm_head_flag" = 1 ]] ; then
|
333
|
+
mono_version="$(mono -V | head -n 1 | cut -d ' ' -f5)"
|
334
|
+
if [[ "$mono_version" =~ ([0-9]+)\.([0-9]+)\.?([0-9]+)? ]] ; then
|
335
|
+
if [[ ${BASH_REMATCH[1]} -lt 2 ]] || ( [[ ${BASH_REMATCH[1]} -eq 2 ]] && [[ ${BASH_REMATCH[2]} -lt 6 ]] ) ; then
|
336
|
+
echo -e "Mono 2.6 (or greater) must be installed and in your path in order to build IronRuby from the repository."
|
337
|
+
echo -e "Version detected: ${BASH_REMATCH[0]}"
|
338
|
+
return 1
|
339
|
+
fi
|
340
|
+
else
|
341
|
+
echo -e "Cannot recognize mono version."
|
342
|
+
return 1
|
343
|
+
fi
|
347
344
|
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
345
|
+
__rvm_fetch_ruby
|
346
|
+
if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
|
347
|
+
|
348
|
+
builtin cd $rvm_ruby_src_path
|
349
|
+
|
350
|
+
rvm_ruby_make="rake MERLIN_ROOT=\"$rvm_ruby_src_path/Merlin/Main\" compile mono=1 configuration=release --trace"
|
351
|
+
__rvm_run "rake" "$rvm_ruby_make" "Building IronRuby..."
|
352
|
+
if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
|
353
|
+
|
354
|
+
rm -rf $rvm_ruby_home/*
|
355
|
+
mkdir -p $rvm_ruby_home/bin $rvm_ruby_home/lib $rvm_ruby_home/lib/ruby $rvm_ruby_home/lib/IronRuby
|
356
|
+
|
357
|
+
cp -r $rvm_ruby_src_path/Merlin/Main/Bin/mono_release/* $rvm_ruby_home/bin/
|
358
|
+
cp -r $rvm_ruby_src_path/Merlin/Main/Languages/Ruby/Scripts/bin/* $rvm_ruby_home/bin/
|
359
|
+
cp -r $rvm_ruby_src_path/Merlin/External.LCA_RESTRICTED/Languages/Ruby/ruby-1.8.6p*/lib/ruby/* $rvm_ruby_home/lib/ruby
|
360
|
+
cp -r $rvm_ruby_src_path/ruby_home/lib/IronRuby
|
361
|
+
else
|
362
|
+
$rvm_scripts_path/log "info" "Retrieving IronRuby"
|
363
|
+
$rvm_scripts_path/fetch "$rvm_url" || (result=$? && return $result)
|
364
|
+
|
365
|
+
__rvm_run "extract" "unzip $rvm_archives_path/$rvm_ruby_package_file ironruby/bin/* ironruby/lib/* -d $rvm_ruby_home" "Extracting $rvm_ruby_package_file ..."
|
366
|
+
if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
|
367
|
+
|
368
|
+
mv $rvm_ruby_home/ironruby/* $rvm_ruby_home
|
369
|
+
rm -rf $rvm_ruby_home/ironruby
|
370
|
+
mv $rvm_ruby_home/lib/ironruby $rvm_ruby_home/lib/IronRuby
|
371
|
+
fi
|
352
372
|
|
353
373
|
binaries="gem irb rake rdoc ri ruby"
|
354
374
|
for binary_name in $(echo $binaries); do
|
@@ -383,12 +403,7 @@ RubyWrapper
|
|
383
403
|
PATH=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
|
384
404
|
PATH=$rvm_bin_path:$PATH ; export PATH
|
385
405
|
|
386
|
-
unset rvm_ruby_configure
|
387
|
-
rvm_ruby_src_path=$rvm_ruby_home
|
388
|
-
# rvm_ruby_make="rake"
|
389
|
-
# rvm_ruby_make_install="rake install"
|
390
406
|
rvm_ruby_home="$rvm_path/$rvm_ruby_interpreter-$rvm_ruby_version"
|
391
|
-
# rvm_ruby_revision="head"
|
392
407
|
|
393
408
|
if [[ ! -d "$rvm_ruby_src_path" ]] || [[ ! -d "$rvm_ruby_src_path/.git" ]] ; then
|
394
409
|
rm -rf $rvm_ruby_src_path
|
@@ -399,6 +414,8 @@ RubyWrapper
|
|
399
414
|
__rvm_run "mput.repo" "git pull origin trunk" "Pulling from origin trunk"
|
400
415
|
fi
|
401
416
|
|
417
|
+
builtin cd $rvm_ruby_src_path
|
418
|
+
|
402
419
|
if [[ ! -s "$rvm_ruby_src_path/configure" ]] ; then
|
403
420
|
if which autoconf &> /dev/null ; then
|
404
421
|
__rvm_run "autoconf" "autoconf" "Running autoconf"
|
@@ -409,19 +426,18 @@ RubyWrapper
|
|
409
426
|
|
410
427
|
if [[ -s ./Makefile ]] && [[ -z "$rvm_reconfigure_flag" ]] ; then
|
411
428
|
(($rvm_debug_flag)) && $rvm_scripts_path/log "debug" "Skipping configure step, Makefile exists so configure must have already been run."
|
412
|
-
elif [[ ! -z "rvm_ruby_configure" ]] ; then
|
413
|
-
|
429
|
+
elif [[ ! -z "$rvm_ruby_configure" ]] ; then
|
430
|
+
__rvm_run "configure" "$rvm_ruby_configure" || (result=$? && return $result)
|
414
431
|
elif [[ -s ./configure ]] ; then
|
415
|
-
__rvm_run "configure" "./configure --prefix=$rvm_ruby_home $rvm_ruby_configure_flags
|
416
|
-
unset configure_parameters
|
432
|
+
__rvm_run "configure" "./configure --prefix=$rvm_ruby_home $rvm_ruby_configure_flags" "Configuring $rvm_ruby_string using $rvm_ruby_configure_flags, this may take a while depending on your cpu(s)..." || (result=$? && return $result)
|
417
433
|
else
|
418
434
|
$rvm_scripts_path/log "error" "Skipping configure step, 'configure' script does not exist, did autoconf not run successfully?"
|
419
435
|
fi
|
420
436
|
|
421
|
-
rvm_ruby_make=${rvm_ruby_make:-"
|
437
|
+
rvm_ruby_make=${rvm_ruby_make:-"make"}
|
422
438
|
__rvm_run "make" "$rvm_ruby_make $rvm_make_flags" "Compiling $rvm_ruby_string, this may take a while, depending on your cpu(s)..." || (result=$? && return $result)
|
423
439
|
|
424
|
-
rvm_ruby_make_install=${rvm_ruby_make_install:-"
|
440
|
+
rvm_ruby_make_install=${rvm_ruby_make_install:-"make install"}
|
425
441
|
__rvm_run "install" "$rvm_ruby_make_install" "Installing $rvm_ruby_string" || (result=$? && return $result)
|
426
442
|
|
427
443
|
$rvm_scripts_path/log "info" "Installation of $rvm_ruby_string is complete."
|
@@ -453,7 +469,7 @@ RubyWrapper
|
|
453
469
|
}
|
454
470
|
|
455
471
|
__rvm_fetch_ruby() {
|
456
|
-
|
472
|
+
if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select ; fi
|
457
473
|
|
458
474
|
if [[ -z "$rvm_head_flag" ]] && [[ -z "$rvm_ruby_tag" ]] && [[ -z "$rvm_ruby_revision" ]] ; then
|
459
475
|
rvm_ruby_package_name="${rvm_ruby_package_name:-"$rvm_ruby_string"}"
|
@@ -521,7 +537,7 @@ __rvm_fetch_ruby() {
|
|
521
537
|
}
|
522
538
|
|
523
539
|
__rvm_uninstall_ruby() {
|
524
|
-
|
540
|
+
if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select ; fi
|
525
541
|
|
526
542
|
if [[ ! -z "$rvm_ruby_string" ]] ; then
|
527
543
|
for dir in $rvm_path ; do
|
@@ -542,7 +558,7 @@ __rvm_uninstall_ruby() {
|
|
542
558
|
}
|
543
559
|
|
544
560
|
__rvm_remove_ruby() {
|
545
|
-
|
561
|
+
if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select ; fi
|
546
562
|
|
547
563
|
if [[ ! -z "$rvm_ruby_string" ]] ; then
|
548
564
|
for dir in $rvm_src_path $rvm_path ; do
|
@@ -703,9 +719,9 @@ __rvm_manage_rubies() {
|
|
703
719
|
fi
|
704
720
|
fi
|
705
721
|
|
706
|
-
|
707
|
-
|
708
|
-
|
722
|
+
if [[ ! -z "$rvm_summary_flag" ]] ; then __rvm_summary ; fi
|
723
|
+
if [[ ! -z "$rvm_yaml_flag" ]] ; then __rvm_yaml ; fi
|
724
|
+
if [[ ! -z "$rvm_json_flag" ]] ; then __rvm_json ; fi
|
709
725
|
}
|
710
726
|
|
711
727
|
rvm_action="$1" ; rubies_string="$2"
|
data/scripts/notes
CHANGED
@@ -19,14 +19,20 @@ if [[ "Linux" = "$system" ]] ; then
|
|
19
19
|
echo -e "\n $ aptitude install curl sun-java6-bin sun-java6-jre sun-java6-jdk"
|
20
20
|
echo -e "\n $item For MRI & ree (if you wish to use it) you will need:"
|
21
21
|
echo -e "\n $ aptitude install curl bison build-essential zlib1g-dev libssl-dev libreadline5-dev libxml2-dev"
|
22
|
+
echo -e "\n $item For IronRuby (if you wish to use it) you will need:"
|
23
|
+
echo -e "\n $ aptitude install curl mono-2.0-devel"
|
22
24
|
|
23
25
|
elif [[ ! -z "$rvm_emerge_binary" ]] ; then
|
24
26
|
echo -e " $item For JRuby (if you wish to use it) you will need:"
|
25
27
|
echo -e "\n $ emerge dev-java/sun-jdk dev-java/sun-jre-bin"
|
28
|
+
echo -e "\n $item For IronRuby (if you wish to use it) you will need:"
|
29
|
+
echo -e "\n $ emerge dev-lang/mono"
|
26
30
|
|
27
31
|
elif [[ ! -z "$rvm_pacman_binary" ]] ; then
|
28
32
|
echo -e " $item For JRuby (if you wish to use it) you will need:"
|
29
|
-
echo -e " $ pacman -Sy jdk jre curl"
|
33
|
+
echo -e "\n $ pacman -Sy jdk jre curl"
|
34
|
+
echo -e "\n $item For IronRuby (if you wish to use it) you will need:"
|
35
|
+
echo -e "\n $ pacman -Sy mono"
|
30
36
|
|
31
37
|
elif [[ ! -z "$rvm_yum_binary" ]] ; then
|
32
38
|
echo -e " $item For ree (if you wish to use it) you will need:"
|
@@ -35,11 +41,15 @@ if [[ "Linux" = "$system" ]] ; then
|
|
35
41
|
else
|
36
42
|
echo -e " $item For JRuby (if you wish to use it) you will need:"
|
37
43
|
echo -e "\n The SUN java runtime environment and development kit."
|
44
|
+
echo -e "\n $item For IronRuby (if you wish to use it) you will need:"
|
45
|
+
echo -e "\n The Mono Runtime and Development Platform (version 2.6 or greater is recommended)."
|
38
46
|
fi
|
39
47
|
elif [[ "Darwin" = "$system" ]] ; then
|
40
48
|
echo -e " $item For Snow Leopard be sure to have XCode Tools Version 3.2.1 (1613) or later (there were bugs with the dvd release version)."
|
41
49
|
echo -e "\n $item You should download the latest XCode tools from developer.apple.com. This will be necessary with the dvd install for Snow Leopard which has bugs."
|
42
50
|
echo -e "\n $item If you intend on installing MacRuby you must install LLVM first."
|
51
|
+
echo -e "\n $item If you intend on installing JRuby you must install Java. The JDK is recommended."
|
52
|
+
echo -e "\n $item If you intend on installing IronRuby you must install Mono (version 2.6 or greater is recommended)."
|
43
53
|
fi
|
44
54
|
|
45
55
|
echo
|
data/scripts/rvm
CHANGED
@@ -23,8 +23,8 @@ if [[ "$rvm_loaded_flag" != "1" ]] || [[ "$rvm_reload_flag" = "1" ]] ; then
|
|
23
23
|
fi
|
24
24
|
if [[ -d "$rvm_path" ]] ; then
|
25
25
|
source $rvm_path/scripts/array
|
26
|
-
source $rvm_path/scripts/initialize
|
27
26
|
source $rvm_path/scripts/utility
|
27
|
+
source $rvm_path/scripts/initialize
|
28
28
|
source $rvm_path/scripts/selector
|
29
29
|
source $rvm_path/scripts/cli
|
30
30
|
#source $rvm_path/scripts/gems
|
data/scripts/rvm-install
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
if [[ -f /etc/rvmrc ]] ; then source /etc/rvmrc ; fi
|
4
4
|
if [[ -f "$HOME/.rvmrc" ]] ; then source "$HOME/.rvmrc" ; fi
|
5
5
|
|
6
|
-
if
|
6
|
+
if ! [[ "$rvm_path" =~ /rvm/?$ ]] ; then
|
7
7
|
unset rvm_path
|
8
8
|
if [[ "root" = "$(whoami)" ]] ; then
|
9
9
|
rvm_path="/usr/local/rvm"
|
@@ -12,6 +12,7 @@ if [[ ! -d "$rvm_path" ]] || [[ "$rvm_path" = "/" ]] ; then
|
|
12
12
|
fi
|
13
13
|
fi
|
14
14
|
|
15
|
+
source scripts/utility
|
15
16
|
source scripts/initialize
|
16
17
|
|
17
18
|
#
|
@@ -54,7 +55,7 @@ fi
|
|
54
55
|
echo -e "\n Installing bin scripts to $rvm_path/bin ..."
|
55
56
|
# Cleanse and purge...
|
56
57
|
rm -f $rvm_path/bin/rvm ; rm -rf $rvm_path/bin/binscripts
|
57
|
-
for file in rvm-prompt rvm ; do
|
58
|
+
for file in rvm-prompt rvm rvmsudo ; do
|
58
59
|
cp -f "$source_dir/binscripts/$file" $rvm_path/bin/
|
59
60
|
done
|
60
61
|
chmod +x $rvm_path/bin/*
|
@@ -68,7 +69,7 @@ if [[ "$rvm_loaded_flag" != "1" ]] ; then
|
|
68
69
|
if [[ ! -f $rcfile ]] ; then touch $rcfile ; fi
|
69
70
|
if [[ -s "$HOME/.profile" ]] ; then
|
70
71
|
if ! grep -q '.profile' "$rcfile" ; then
|
71
|
-
echo " Adding 'if [[ -s
|
72
|
+
echo " Adding 'if [[ -s \$HOME/.profile ]] ; then source \$HOME ; fi' to $rcfile."
|
72
73
|
echo -e "\n# rvm-install added line:\nif [[ -s \$HOME/.profile ]] ; then source \$HOME/.profile ; fi\n" >> $rcfile
|
73
74
|
fi
|
74
75
|
fi
|
@@ -81,6 +82,7 @@ fi
|
|
81
82
|
|
82
83
|
if [[ "root" = "$(whoami)" ]] ; then
|
83
84
|
echo -e "\n Symlinking rvm to $rvm_symlink_path/rvm ..."
|
85
|
+
mkdir -p $rvm_symlink_path
|
84
86
|
ln -nfs $rvm_path/bin/rvm $rvm_symlink_path/rvm
|
85
87
|
chmod +x $rvm_symlink_path/rvm
|
86
88
|
fi
|
data/scripts/selector
CHANGED
@@ -42,16 +42,23 @@ __rvm_select() {
|
|
42
42
|
rbx|rubinius)
|
43
43
|
rvm_ruby_interpreter="rbx"
|
44
44
|
rvm_ruby_version=${rvm_ruby_version:-$(__rvm_db "rbx_version")}
|
45
|
-
rvm_ruby_patch_level=${rvm_ruby_patch_level:-$(__rvm_db "rbx_patch_level")}
|
46
45
|
rvm_ruby_repo_url=${rvm_rbx_repo_url:-$(__rvm_db "rubinius_repo_url")}
|
47
46
|
__rvm_db "rbx_url" "rvm_url"
|
48
|
-
|
49
|
-
|
47
|
+
if [[ -z "$rvm_head_flag" ]] ; then
|
48
|
+
rvm_ruby_patch_level=${rvm_ruby_patch_level:-$(__rvm_db "rbx_patch_level")}
|
49
|
+
rvm_ruby_string="$rvm_ruby_interpreter-$rvm_ruby_version-p$rvm_ruby_patch_level"
|
50
|
+
rvm_ruby_string="${rvm_ruby_string/-prc/-rc}"
|
51
|
+
rvm_ruby_string="$(echo $rvm_ruby_string | sed 's#-pp#-p#')"
|
52
|
+
rvm_ruby_file="rubinius-$rvm_ruby_version-$rvm_ruby_patch_level"
|
53
|
+
else
|
54
|
+
unset rvm_ruby_patch_level
|
55
|
+
rvm_ruby_string="$rvm_ruby_interpreter-$rvm_ruby_version-head"
|
56
|
+
fi
|
50
57
|
;;
|
51
58
|
|
52
59
|
jruby)
|
53
60
|
unset rvm_ruby_patch_level
|
54
|
-
if [[ "$rvm_head_flag"
|
61
|
+
if [[ ! -z "$rvm_head_flag" ]] ; then
|
55
62
|
rvm_ruby_version="head"
|
56
63
|
rvm_ruby_string="jruby-head"
|
57
64
|
rvm_ruby_repo_url="${rvm_ruby_repo_url:-$(__rvm_db "jruby_repo_url")}"
|
@@ -69,11 +76,19 @@ __rvm_select() {
|
|
69
76
|
|
70
77
|
ironruby)
|
71
78
|
unset rvm_ruby_patch_level
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
79
|
+
if [[ "$rvm_head_flag" -eq 1 ]] ; then
|
80
|
+
rvm_ruby_version="head"
|
81
|
+
rvm_ruby_string="${rvm_ruby_interpreter}-${rvm_ruby_version}"
|
82
|
+
rvm_ruby_package_name="${rvm_ruby_string}"
|
83
|
+
rvm_ruby_repo_url="${rvm_ruby_repo_url:-$(__rvm_db "ironruby_repo_url")}"
|
84
|
+
rvm_url="${rvm_ruby_repo_url:-$(__rvm_db "ironruby_repo_url")}"
|
85
|
+
else
|
86
|
+
rvm_ruby_version=${rvm_ruby_version:-"$(__rvm_db "ironruby_version")"}
|
87
|
+
rvm_ruby_string="${rvm_ruby_interpreter}-${rvm_ruby_version}"
|
88
|
+
rvm_ruby_package_file="${rvm_ruby_string}.zip"
|
89
|
+
rvm_ruby_package_name="${rvm_ruby_string}"
|
90
|
+
rvm_url="$(__rvm_db "ironruby_url")${rvm_ruby_package_file}"
|
91
|
+
fi
|
77
92
|
;;
|
78
93
|
|
79
94
|
ree)
|
@@ -154,10 +169,10 @@ __rvm_select() {
|
|
154
169
|
rvm_ruby_src_path="$rvm_src_path/$rvm_ruby_string"
|
155
170
|
rvm_ruby_binary="$rvm_ruby_home/bin/ruby"
|
156
171
|
rvm_ruby_irbrc="$rvm_ruby_home/.irbrc"
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
rvm_ruby_gem_home="${
|
172
|
+
rvm_ruby_gem_home="${rvm_gem_path}/${rvm_ruby_string}"
|
173
|
+
|
174
|
+
if [[ ! -z "$rvm_gem_set_name" ]] ; then
|
175
|
+
rvm_ruby_gem_home="${rvm_ruby_gem_home}%${rvm_gem_set_name}"
|
161
176
|
fi
|
162
177
|
|
163
178
|
rvm_ruby_selected_flag=1
|
@@ -231,7 +246,7 @@ __rvm_use() {
|
|
231
246
|
if [[ ! -d $MY_RUBY_HOME ]] ; then
|
232
247
|
$rvm_scripts_path/log "warn" "$rvm_ruby_interpreter $rvm_ruby_string is not installed."
|
233
248
|
if [[ ! -z "$rvm_install_on_use_flag" ]] ; then
|
234
|
-
|
249
|
+
$rvm_scripts_path/manage "install" "$rvm_ruby_string"
|
235
250
|
else
|
236
251
|
$rvm_scripts_path/log "info" "To install do: 'rvm install $rvm_ruby_string'"
|
237
252
|
return 1
|
@@ -277,9 +292,8 @@ __rvm_use() {
|
|
277
292
|
if [[ ! -z "$rvm_default_flag" ]] ; then $rvm_scripts_path/symlink "default" ; fi
|
278
293
|
fi
|
279
294
|
fi
|
280
|
-
|
281
|
-
unset rvm_default_flag
|
282
295
|
fi
|
296
|
+
unset rvm_default_flag
|
283
297
|
|
284
298
|
if [[ ! -z "$rvm_symlink_name" ]] ; then $rvm_scripts_path/symlink "$rvm_symlink_name" ; unset rvm_symlink_name ; fi
|
285
299
|
if [[ ! -z "$rvm_editor_flag" ]] ; then $rvm_scripts_path/symlink "editor" ; unset rvm_editor_flag ; fi
|
@@ -329,6 +343,8 @@ __rvm_ruby_string() {
|
|
329
343
|
break
|
330
344
|
elif $rvm_scripts_path/match "$string" "^preview" ; then
|
331
345
|
rvm_ruby_patch_level="$string"
|
346
|
+
elif $rvm_scripts_path/match "$string" "^rc[0-9]" ; then
|
347
|
+
rvm_ruby_patch_level="$string"
|
332
348
|
elif $rvm_scripts_path/match "$string" "^[0-9]\.[0-9]" ; then
|
333
349
|
if [[ "1.8" = "$string" ]] ; then string="1.8.6" ; fi
|
334
350
|
if [[ "1.9" = "$string" ]] ; then string="1.9.1" ; fi
|
@@ -360,7 +376,7 @@ __rvm_ruby_string() {
|
|
360
376
|
elif $rvm_scripts_path/match "$string" "^u[a-z0-9]" ; then
|
361
377
|
unset rvm_ruby_patch_level rvm_ruby_revision rvm_ruby_tag rvm_ruby_patch
|
362
378
|
rvm_ruby_user_tag="$string"
|
363
|
-
elif
|
379
|
+
elif $rvm_scripts_path/match "ruby rbx jruby macruby ree rubinius mput shyouhei ironruby" "$string" ; then
|
364
380
|
rvm_ruby_interpreter="$string"
|
365
381
|
else
|
366
382
|
$rvm_scripts_path/log "error" "Unknown ruby string component: '$string'"
|
@@ -411,6 +427,7 @@ __rvm_ruby_string() {
|
|
411
427
|
if [[ ! -z "$rvm_ruby_patch_level" ]] ; then
|
412
428
|
rvm_ruby_patch_level="$(echo $rvm_ruby_patch_level | sed 's#^pp#p#')"
|
413
429
|
rvm_ruby_string="${rvm_ruby_string}-${rvm_ruby_patch_level}"
|
430
|
+
rvm_ruby_string="$(echo $rvm_ruby_string | sed 's#-pp#-p#')"
|
414
431
|
fi
|
415
432
|
fi
|
416
433
|
}
|
data/scripts/update
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
if [[ -f /etc/rvmrc ]] ; then source /etc/rvmrc ; fi
|
4
4
|
if [[ -f "$HOME/.rvmrc" ]] ; then source "$HOME/.rvmrc" ; fi
|
5
5
|
|
6
|
-
if
|
6
|
+
if ! [[ "$rvm_path" =~ /rvm/?$ ]] ; then
|
7
7
|
unset rvm_path
|
8
8
|
if [[ "root" = "$(whoami)" ]] ; then
|
9
9
|
rvm_path="/usr/local/rvm"
|
@@ -12,6 +12,7 @@ if [[ ! -d "$rvm_path" ]] || [[ "$rvm_path" = "/" ]] ; then
|
|
12
12
|
fi
|
13
13
|
fi
|
14
14
|
|
15
|
+
source scripts/utility
|
15
16
|
source scripts/initialize
|
16
17
|
|
17
18
|
#
|
@@ -54,7 +55,7 @@ fi
|
|
54
55
|
echo -e "\n Installing bin scripts to $rvm_path/bin ..."
|
55
56
|
# Cleanse and purge...
|
56
57
|
rm -f $rvm_path/bin/rvm ; rm -rf $rvm_path/bin/binscripts
|
57
|
-
for file in rvm-prompt rvm ; do
|
58
|
+
for file in rvm-prompt rvm rvmsudo ; do
|
58
59
|
cp -f "$source_dir/binscripts/$file" $rvm_path/bin/
|
59
60
|
done
|
60
61
|
chmod +x $rvm_path/bin/*
|
@@ -68,7 +69,7 @@ if [[ "$rvm_loaded_flag" != "1" ]] ; then
|
|
68
69
|
if [[ ! -f $rcfile ]] ; then touch $rcfile ; fi
|
69
70
|
if [[ -s "$HOME/.profile" ]] ; then
|
70
71
|
if ! grep -q '.profile' "$rcfile" ; then
|
71
|
-
echo " Adding 'if [[ -s
|
72
|
+
echo " Adding 'if [[ -s \$HOME/.profile ]] ; then source \$HOME ; fi' to $rcfile."
|
72
73
|
echo -e "\n# rvm-install added line:\nif [[ -s \$HOME/.profile ]] ; then source \$HOME/.profile ; fi\n" >> $rcfile
|
73
74
|
fi
|
74
75
|
fi
|
@@ -81,6 +82,7 @@ fi
|
|
81
82
|
|
82
83
|
if [[ "root" = "$(whoami)" ]] ; then
|
83
84
|
echo -e "\n Symlinking rvm to $rvm_symlink_path/rvm ..."
|
85
|
+
mkdir -p $rvm_symlink_path
|
84
86
|
ln -nfs $rvm_path/bin/rvm $rvm_symlink_path/rvm
|
85
87
|
chmod +x $rvm_symlink_path/rvm
|
86
88
|
fi
|
data/scripts/utility
CHANGED
@@ -157,7 +157,7 @@ __rvm_bin_scripts() {
|
|
157
157
|
}
|
158
158
|
|
159
159
|
__rvm_bin_script() {
|
160
|
-
if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select
|
160
|
+
if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select ; fi
|
161
161
|
ruby_wrapper=$(cat <<RubyWrapper
|
162
162
|
#!/bin/bash
|
163
163
|
|
@@ -260,7 +260,7 @@ __rvm_implode() {
|
|
260
260
|
}
|
261
261
|
|
262
262
|
__rvm_source_dir() {
|
263
|
-
if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select
|
263
|
+
if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select ; fi
|
264
264
|
if [[ -z "$rvm_ruby_src_path" ]] ; then
|
265
265
|
$rvm_scripts_path/log "fail" "No source directory exists for the default implementation."
|
266
266
|
else
|
@@ -281,7 +281,7 @@ __rvm_list() {
|
|
281
281
|
echo -e "rbx(-head) # rubinius head, the default rbx \nrbx(-head) --jit (rubinius head with LLVM enabled)"
|
282
282
|
echo -e "ree-1.8.6\nree(-1.8.7) # the default\nree-1.8.6-head\nree-1.8.7-head"
|
283
283
|
echo -e "mput(-head) # shyouhei head, the default mput"
|
284
|
-
echo -e "ironruby-0.9.3 # (1.0 RC1)"
|
284
|
+
echo -e "ironruby-0.9.3 # (1.0 RC1)\nironruby-head"
|
285
285
|
if [[ "Darwin" = "$(uname)" ]] ; then
|
286
286
|
echo -e "macruby(-nightly) # the default macruby\nmacruby-head # Build from the macruby git repository"
|
287
287
|
fi
|
@@ -681,10 +681,10 @@ __rvm_gems_select() {
|
|
681
681
|
fi
|
682
682
|
|
683
683
|
if [[ ! -z "$rvm_gem_set_name" ]] && ! $rvm_scripts_path/match "$rvm_gem_set_name" "^[0-9]\.[0-9]" ; then
|
684
|
-
rvm_ruby_gem_home="$rvm_gem_path/$
|
684
|
+
rvm_ruby_gem_home="$rvm_gem_path/$rvm_ruby_string%$rvm_gem_set_name"
|
685
685
|
else
|
686
686
|
if [[ ! -z "$rvm_ruby_interpreter" ]] && [[ ! -z "$rvm_ruby_version" ]] && [[ "$rvm_ruby_interpreter" != "system" ]] ; then
|
687
|
-
rvm_ruby_gem_home="$rvm_gem_path/$
|
687
|
+
rvm_ruby_gem_home="$rvm_gem_path/$rvm_ruby_string"
|
688
688
|
elif [[ -z "$GEM_HOME" ]] && [[ ! -z "$(which gem 2>/dev/null)" ]] ; then
|
689
689
|
rvm_ruby_gem_home=$(gem env gemdir)
|
690
690
|
elif [[ ! -z "$GEM_HOME" ]] ; then
|
@@ -695,12 +695,12 @@ __rvm_gems_select() {
|
|
695
695
|
fi
|
696
696
|
if [[ -z "$rvm_gem_set_name" ]] ; then unset rvm_gem_set_name ; fi
|
697
697
|
else
|
698
|
-
rvm_ruby_gem_home="$rvm_gem_path/$
|
698
|
+
rvm_ruby_gem_home="$rvm_gem_path/$rvm_ruby_string%$rvm_gem_set_name"
|
699
699
|
fi
|
700
700
|
}
|
701
701
|
|
702
702
|
__rvm_gems_use() {
|
703
|
-
if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select
|
703
|
+
if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select ; fi
|
704
704
|
|
705
705
|
if [[ ! -z "$rvm_ruby_gem_home" ]] ; then
|
706
706
|
mkdir -p "$rvm_ruby_gem_home"
|
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.98
|
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-12-
|
12
|
+
date: 2009-12-21 00:00:00 -05:00
|
13
13
|
default_executable: rvm-install
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -26,6 +26,7 @@ files:
|
|
26
26
|
- README
|
27
27
|
- binscripts/rvm
|
28
28
|
- binscripts/rvm-prompt
|
29
|
+
- binscripts/rvmsudo
|
29
30
|
- config/db
|
30
31
|
- config/md5
|
31
32
|
- examples/rvmrc
|