rvm 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README +64 -51
- data/binscripts/rvm-auto-ruby +1 -1
- data/binscripts/rvm-shell +1 -1
- data/contrib/install-system-wide +3 -3
- data/help/cleanup +23 -0
- data/help/disk-usage +15 -0
- data/help/docs +22 -0
- data/help/exec +33 -0
- data/help/migrate +15 -0
- data/help/repair +23 -0
- data/help/rubygems +11 -0
- data/help/rvmrc +34 -0
- data/help/snapshot +15 -0
- data/help/tools +22 -0
- data/help/upgrade +18 -0
- data/install +11 -7
- data/lib/VERSION.yml +1 -1
- data/lib/rvm/environment.rb +2 -1
- data/lib/rvm/environment/tools.rb +7 -1
- data/lib/rvm/errors.rb +3 -0
- data/rvm.gemspec +13 -2
- data/scripts/alias +2 -2
- data/scripts/cli +7 -13
- data/scripts/disk-usage +6 -2
- data/scripts/help +6 -6
- data/scripts/info +11 -3
- data/scripts/install +11 -7
- data/scripts/list +4 -3
- data/scripts/log +2 -1
- data/scripts/manage +27 -18
- data/scripts/override_gem +10 -0
- data/scripts/repair +1 -1
- data/scripts/rubygems +1 -1
- data/scripts/rvm +9 -2
- data/scripts/rvm-install +11 -7
- data/scripts/selector +8 -8
- data/scripts/snapshot +3 -3
- data/scripts/tools +8 -3
- data/scripts/update +11 -7
- data/scripts/utility +47 -29
- data/scripts/wrapper +1 -1
- metadata +15 -4
data/lib/VERSION.yml
CHANGED
data/lib/rvm/environment.rb
CHANGED
@@ -11,7 +11,8 @@ module RVM
|
|
11
11
|
end
|
12
12
|
|
13
13
|
# The default config has rvm_silence_logging so that log doesn't print anything to stdout.
|
14
|
-
merge_config! :rvm_silence_logging => 1
|
14
|
+
merge_config! :rvm_silence_logging => 1,
|
15
|
+
:rvm_promptless => 1
|
15
16
|
|
16
17
|
attr_reader :environment_name, :shell_wrapper
|
17
18
|
|
@@ -8,7 +8,13 @@ module RVM
|
|
8
8
|
|
9
9
|
# Gets the identifier after cd'ing to a path, no destructive.
|
10
10
|
def tools_path_identifier(path)
|
11
|
-
|
11
|
+
path_identifier = rvm(:tools, "path-identifier", path.to_s)
|
12
|
+
if path_identifier.exit_status == 2
|
13
|
+
error_message = "The rvmrc located in '#{path}' could not be loaded, likely due to trust mechanisms."
|
14
|
+
error_message << " Please run 'rvm rvmrc {trust,untrust} \"#{path}\"' to continue, or set rvm_trust_rvmrcs to 1."
|
15
|
+
raise ErrorLoadingRVMRC, error_message
|
16
|
+
end
|
17
|
+
return normalize(path_identifier.stdout)
|
12
18
|
end
|
13
19
|
|
14
20
|
def tools_strings(*rubies)
|
data/lib/rvm/errors.rb
CHANGED
@@ -24,5 +24,8 @@ module RVM
|
|
24
24
|
#
|
25
25
|
# Provides access to the output of the shell command via +#result+.
|
26
26
|
class IncompatibleRubyError < ErrorWithResult; end
|
27
|
+
|
28
|
+
# Called when tools.path_identifier is called on a dir with an untrusted rvmrc.
|
29
|
+
class ErrorLoadingRVMRC < Error; end
|
27
30
|
|
28
31
|
end
|
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 = "1.0.
|
8
|
+
s.version = "1.0.1"
|
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-08-
|
12
|
+
s.date = %q{2010-08-27}
|
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}
|
@@ -37,7 +37,11 @@ Gem::Specification.new do |s|
|
|
37
37
|
"gemsets/global.gems",
|
38
38
|
"help/alias",
|
39
39
|
"help/benchmark",
|
40
|
+
"help/cleanup",
|
40
41
|
"help/debug",
|
42
|
+
"help/disk-usage",
|
43
|
+
"help/docs",
|
44
|
+
"help/exec",
|
41
45
|
"help/fetch",
|
42
46
|
"help/gem",
|
43
47
|
"help/gemdir",
|
@@ -46,19 +50,25 @@ Gem::Specification.new do |s|
|
|
46
50
|
"help/info",
|
47
51
|
"help/install",
|
48
52
|
"help/list",
|
53
|
+
"help/migrate",
|
49
54
|
"help/monitor",
|
50
55
|
"help/notes",
|
51
56
|
"help/package",
|
52
57
|
"help/rake",
|
53
58
|
"help/remove",
|
59
|
+
"help/repair",
|
54
60
|
"help/reset",
|
55
61
|
"help/ruby",
|
62
|
+
"help/rubygems",
|
56
63
|
"help/rvmrc",
|
64
|
+
"help/snapshot",
|
57
65
|
"help/specs",
|
58
66
|
"help/srcdir",
|
59
67
|
"help/tests",
|
68
|
+
"help/tools",
|
60
69
|
"help/uninstall",
|
61
70
|
"help/update",
|
71
|
+
"help/upgrade",
|
62
72
|
"help/use",
|
63
73
|
"help/wrapper",
|
64
74
|
"install",
|
@@ -123,6 +133,7 @@ Gem::Specification.new do |s|
|
|
123
133
|
"scripts/migrate",
|
124
134
|
"scripts/monitor",
|
125
135
|
"scripts/notes",
|
136
|
+
"scripts/override_gem",
|
126
137
|
"scripts/package",
|
127
138
|
"scripts/patches",
|
128
139
|
"scripts/patchsets",
|
data/scripts/alias
CHANGED
@@ -9,8 +9,8 @@ alias_conflicts_with_ruby() {
|
|
9
9
|
[[ "$1" == "default" && ! -L "$rvm_rubies_path/default" ]] && return 1
|
10
10
|
# Open for suggestions to a better way of doing this...
|
11
11
|
alias_check_result="$(
|
12
|
-
|
13
|
-
|
12
|
+
\. $rvm_scripts_path/initialize
|
13
|
+
\. $rvm_scripts_path/selector
|
14
14
|
export rvm_ruby_string="$1"
|
15
15
|
__rvm_ruby_string > /dev/null 2>&1
|
16
16
|
echo "$?"
|
data/scripts/cli
CHANGED
@@ -1,14 +1,6 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
|
-
__rvm_usage() {
|
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
|
-
#}
|
3
|
+
__rvm_usage() { ${PAGER:-less} "${rvm_path:-$HOME/.rvm}/README" ; }
|
12
4
|
|
13
5
|
__rvm_run_script() {
|
14
6
|
local rvm_script_name="${1:-"$rvm_action"}"
|
@@ -143,7 +135,7 @@ __rvm_parse_args() {
|
|
143
135
|
rvm_ruby_args="'load' $(__rvm_quote_args "$@")"
|
144
136
|
rvm_parse_break=1
|
145
137
|
;;
|
146
|
-
|
138
|
+
|
147
139
|
rvmrc)
|
148
140
|
rvm_action="rvmrc"
|
149
141
|
rvm_ruby_args="$(__rvm_quote_args "$@")"
|
@@ -468,14 +460,16 @@ __rvm_parse_args() {
|
|
468
460
|
rvm() {
|
469
461
|
__rvm_setup
|
470
462
|
|
471
|
-
|
463
|
+
case $- in *i*) rvm_interactive=1 ;;
|
464
|
+
*) unset rvm_interactive ;;
|
465
|
+
esac ; export rvm_interactive
|
472
466
|
|
473
467
|
if [[ -z "$ZSH_VERSION" ]] ; then
|
474
468
|
trap '\rm -rf "$rvm_tmp_path/$$" >/dev/null 2>&1' 0 1 2 3 15
|
475
469
|
fi
|
476
470
|
|
477
471
|
# Check that this is the current version.
|
478
|
-
disk_version=$(
|
472
|
+
disk_version=$(tail -n 3 < "${rvm_path:-$HOME/.rvm}/lib/VERSION.yml" | sed -e 's/^.*: //g' | \tr "\n" '.' | sed -e 's/\.$//')
|
479
473
|
if [[ "${rvm_version}" != "${disk_version}" ]] && [[ "reload" != "$1" ]]; then
|
480
474
|
printf "\nA RVM version ${disk_version} is installed yet ${rvm_version} is loaded.\n Please do one of the following:\n * 'rvm reload'\n * open a new shell\n * source your shell init scripts"
|
481
475
|
return 1
|
@@ -551,7 +545,7 @@ rvm() {
|
|
551
545
|
__rvm_run_script "$rvm_action"
|
552
546
|
result=$?
|
553
547
|
;;
|
554
|
-
|
548
|
+
|
555
549
|
rvmrc)
|
556
550
|
eval "__rvm_rvmrc_tools $rvm_ruby_args"
|
557
551
|
result="$?"
|
data/scripts/disk-usage
CHANGED
@@ -5,7 +5,7 @@ rvm_base_except="selector"
|
|
5
5
|
source "$rvm_scripts_path/base"
|
6
6
|
|
7
7
|
usage() {
|
8
|
-
printf "Usage: 'rvm disk-usage {all,archives,repos,sources,logs,packages}'\n"
|
8
|
+
printf "Usage: 'rvm disk-usage {all,archives,repos,sources,logs,packages,rubies,gemsets}'\n"
|
9
9
|
printf " Lists the space rvm uses for a given item.\n"
|
10
10
|
exit 1
|
11
11
|
}
|
@@ -28,6 +28,8 @@ all_disk_usage() {
|
|
28
28
|
sources_disk_usage
|
29
29
|
logs_disk_usage
|
30
30
|
packages_disk_usage
|
31
|
+
rubies_disk_usage
|
32
|
+
gemsets_disk_usage
|
31
33
|
total_disk_usage
|
32
34
|
}
|
33
35
|
|
@@ -40,12 +42,14 @@ repos_disk_usage() { disk_usage "Repositories" "repo"; }
|
|
40
42
|
sources_disk_usage() { disk_usage "Extracted Source Code" "src"; }
|
41
43
|
logs_disk_usage() { disk_usage "Log Files" "log"; }
|
42
44
|
packages_disk_usage() { disk_usage "Packages" "usr"; }
|
45
|
+
rubies_disk_usage() { disk_usage "Rubies" "rubies"; }
|
46
|
+
gemsets_disk_usage() { disk_usage "Gemsets" "gems"; }
|
43
47
|
|
44
48
|
|
45
49
|
# Exit when there is no argument.
|
46
50
|
[[ -z "$1" ]] && usage
|
47
51
|
|
48
52
|
case "$1" in
|
49
|
-
all|archives|repos|sources|logs|total|packages) eval "$1_disk_usage" ;;
|
53
|
+
all|archives|repos|sources|logs|total|packages|rubies|gemsets) eval "$1_disk_usage" ;;
|
50
54
|
*) usage ;;
|
51
55
|
esac
|
data/scripts/help
CHANGED
@@ -11,16 +11,16 @@ args=$(echo "$*" | awk '{$1=""; $2="" ; print}' | sed -e 's/^[[:space:]]*//' -e
|
|
11
11
|
|
12
12
|
if [[ ! -z "$command" ]] && [[ -s "${rvm_help_path}/${command}" ]] ; then
|
13
13
|
if [[ ! -z "$action" ]] && [[ -s "${rvm_help_path}/${command}/${action}" ]] ; then
|
14
|
-
|
14
|
+
${PAGER:-less} "${rvm_help_path}/${command}/${action}"
|
15
15
|
else
|
16
|
-
|
16
|
+
${PAGER:-less} "${rvm_help_path}/${command}"
|
17
17
|
fi
|
18
18
|
else
|
19
|
-
|
20
|
-
$rvm_scripts_path/log "info" "
|
19
|
+
${PAGER:-less} "${rvm_path:-$HOME/.rvm}/README"
|
20
|
+
$rvm_scripts_path/log "info" "Commands available with 'rvm help':\n\n $(builtin cd "${rvm_help_path}" ; \ls | \tr "\n" ' ')"
|
21
21
|
fi
|
22
22
|
|
23
|
-
$rvm_scripts_path/log "info" "
|
24
|
-
$rvm_scripts_path/log "info" "
|
23
|
+
$rvm_scripts_path/log "info" "For additional information please visit RVM's documentation website:\n\n http://rvm.beginrescueend.com/"
|
24
|
+
$rvm_scripts_path/log "info" "If you still cannot find what an answer to your question, find me 'wayneeseguin' in #rvm on irc.freenode.net:\n\n http://webchat.freenode.net/?channels=rvm\n"
|
25
25
|
|
26
26
|
exit $?
|
data/scripts/info
CHANGED
@@ -7,10 +7,18 @@ rvm_ruby_gem_home="${rvm_ruby_gem_home:-$GEM_HOME}"
|
|
7
7
|
|
8
8
|
if [[ ! -d "$rvm_ruby_gem_home" ]] && command -v gem > /dev/null 2>&1; then rvm_ruby_gem_home="$(gem env home)" ; fi
|
9
9
|
|
10
|
+
version_for() {
|
11
|
+
if command -v "$1" >/dev/null ; then
|
12
|
+
$1 --version | head -n1
|
13
|
+
else
|
14
|
+
echo "not installed"
|
15
|
+
fi
|
16
|
+
}
|
17
|
+
|
10
18
|
info_system() {
|
11
19
|
rvm_info="$rvm_info\n system:\n uname: \"$(uname -a)\""
|
12
|
-
rvm_info="$rvm_info\n zsh: \"$(zsh
|
13
|
-
rvm_info="$rvm_info\n bash: \"$(bash
|
20
|
+
rvm_info="$rvm_info\n zsh: \"$(version_for zsh)\""
|
21
|
+
rvm_info="$rvm_info\n bash: \"$(version_for bash)\""
|
14
22
|
rvm_info="$rvm_info\n"
|
15
23
|
}
|
16
24
|
|
@@ -97,7 +105,7 @@ info_debug() {
|
|
97
105
|
|
98
106
|
for file_name in $(echo $debug_files); do
|
99
107
|
if [[ -f "$file_name" ]] && [[ -s "$file_name" ]] ; then
|
100
|
-
rvm_info="$rvm_info\n$file_name \(filtered\):\n$(
|
108
|
+
rvm_info="$rvm_info\n$file_name \(filtered\):\n$(awk '!/assword|_key/' < $file_name)\n"
|
101
109
|
fi
|
102
110
|
done
|
103
111
|
|
data/scripts/install
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
|
+
#set -u # Error on uninitialized variables.
|
4
|
+
|
3
5
|
if [[ -z "$rvm_selfcontained" ]]; then
|
4
6
|
if [[ "root" = "$(whoami)" ]] || [[ -n "$rvm_prefix" && "$rvm_prefix" != "$HOME"/* ]]; then
|
5
7
|
export rvm_selfcontained=0
|
@@ -15,6 +17,8 @@ if [[ -d "$install_source_path/scripts" ]] && [[ -s "$install_source_path/script
|
|
15
17
|
builtin cd "$install_source_path"
|
16
18
|
fi
|
17
19
|
|
20
|
+
sleep=0.010
|
21
|
+
|
18
22
|
source scripts/version
|
19
23
|
source scripts/utility
|
20
24
|
|
@@ -44,7 +48,7 @@ spinner() {
|
|
44
48
|
index=$((($spinner_counter % 8)))
|
45
49
|
printf "\r${array[$index]}"
|
46
50
|
let "spinner_counter=spinner_counter+1"
|
47
|
-
|
51
|
+
sleep $sleep
|
48
52
|
}
|
49
53
|
|
50
54
|
if echo "$*" | \grep -q 'trace' ; then echo "$*" ; env | \grep '^rvm_' ; set -x ; fi
|
@@ -54,7 +58,7 @@ while [[ $# -gt 0 ]] ; do
|
|
54
58
|
case "$token" in
|
55
59
|
--auto) rvm_auto_flag=1 ;;
|
56
60
|
--prefix) rvm_prefix="$1" ; shift ;;
|
57
|
-
--version) rvm_path="$
|
61
|
+
--version) rvm_path="$PWD" ; __rvm_version ; unset rvm_path ; exit ;;
|
58
62
|
--help|*) usage ;;
|
59
63
|
esac
|
60
64
|
done
|
@@ -89,7 +93,7 @@ __rvm_initialize
|
|
89
93
|
#
|
90
94
|
item="$(tput setaf 2)* $(tput sgr0)"
|
91
95
|
question="\n$(tput setaf 2)<?>$(tput sgr0)"
|
92
|
-
cwd=$
|
96
|
+
cwd=$PWD
|
93
97
|
source_path="${source_path:-$cwd}"
|
94
98
|
rvm_archives_path="${rvm_archives_path:-"$rvm_path/archives"}"
|
95
99
|
rvm_src_path="${rvm_src_path:-"$rvm_path/src"}"
|
@@ -161,7 +165,7 @@ done
|
|
161
165
|
#
|
162
166
|
# Cleanse and purge...
|
163
167
|
for file in rvm-prompt rvm rvmsudo rvm-shell rvm-auto-ruby ; do
|
164
|
-
spinner &&
|
168
|
+
spinner && sleep $sleep
|
165
169
|
\rm -f "$rvm_bin_path/$file"
|
166
170
|
\cp -f "$source_path/binscripts/$file" $rvm_bin_path/
|
167
171
|
done
|
@@ -197,7 +201,7 @@ fi
|
|
197
201
|
spinner
|
198
202
|
if [[ -d gemsets/ ]] ; then
|
199
203
|
\mkdir -p "$rvm_gemsets_path"
|
200
|
-
for gemset_file in $(cd gemsets ; find
|
204
|
+
for gemset_file in $(cd gemsets ; find \. -iname '*.gems' | sed 's/^\.\///') ; do
|
201
205
|
destination="$rvm_gemsets_path/$gemset_file"
|
202
206
|
destination_path="$(dirname "$destination")"
|
203
207
|
if [[ ! -s "$destination" ]] ; then
|
@@ -210,7 +214,7 @@ fi
|
|
210
214
|
spinner
|
211
215
|
if [[ -d patchsets/ ]] ; then
|
212
216
|
\mkdir -p "$rvm_patchsets_path"
|
213
|
-
for patchset_file in $(cd patchsets ; find
|
217
|
+
for patchset_file in $(cd patchsets ; find \. -iname '*' | sed 's/^\.\///') ; do
|
214
218
|
destination="$rvm_patchsets_path/$patchset_file"
|
215
219
|
destination_path="$(dirname "$destination")"
|
216
220
|
if [[ ! -s "$destination" ]] ; then
|
@@ -306,7 +310,7 @@ printf "\nThank you for using rvm. I hope that it makes your work easier and mor
|
|
306
310
|
printf "\nIf you have any questions, issues and/or ideas for improvement please hop in #rvm on irc.freenode.net and let me know."
|
307
311
|
printf "\nMy irc nickname is 'wayneeseguin' and I hang out from ~09:00-17:00EST and again from ~21:00EST-~00:00EST."
|
308
312
|
printf "\nIf I do not respond right away, please hang around after asking your question, I will respond as soon as I am back."
|
309
|
-
printf "\nBe sure to get head often as rvm development happens fast, you can do this by
|
313
|
+
printf "\nBe sure to get head often as rvm development happens fast, you can do this by running 'rvm update --head'."
|
310
314
|
printf "\n w$(tput setaf 2)⦿‿⦿$(tput sgr0)t!"
|
311
315
|
printf "\n ~ Wayne\n"
|
312
316
|
|
data/scripts/list
CHANGED
@@ -90,7 +90,7 @@ list_gemset_strings() {
|
|
90
90
|
|
91
91
|
# This is meant to be used with scripting.
|
92
92
|
list_known_strings() {
|
93
|
-
|
93
|
+
sed -e 's/#.*$//g' -e 's/(//g' -e 's/)//g' < "$rvm_config_path/known" | sort -r | uniq
|
94
94
|
}
|
95
95
|
|
96
96
|
list_known() {
|
@@ -98,10 +98,11 @@ list_known() {
|
|
98
98
|
list_known_strings
|
99
99
|
return 0
|
100
100
|
fi
|
101
|
-
|
101
|
+
|
102
|
+
if [[ "$rvm_interactive" != "1" ]] ; then
|
102
103
|
cat "$rvm_config_path/known"
|
103
104
|
else
|
104
|
-
|
105
|
+
${PAGER:-less} "$rvm_config_path/known"
|
105
106
|
fi
|
106
107
|
}
|
107
108
|
|
data/scripts/log
CHANGED
@@ -9,7 +9,7 @@ if [[ ! -z "$2" ]] ; then level=$1 ; shift ; else level="info" ; fi
|
|
9
9
|
|
10
10
|
message="$(echo "$1" | sed 's/%/%%/g')"
|
11
11
|
|
12
|
-
if [[
|
12
|
+
if [[ "$rvm_interactive" != "1" ]] ; then
|
13
13
|
case "$level" in
|
14
14
|
debug) shift ; printf "\n$level: $message\n" ;;
|
15
15
|
info) shift ; printf "\n$level: $message\n" ;;
|
@@ -28,5 +28,6 @@ else
|
|
28
28
|
*) printf "$message"
|
29
29
|
esac
|
30
30
|
fi
|
31
|
+
set +x
|
31
32
|
|
32
33
|
exit 0
|
data/scripts/manage
CHANGED
@@ -64,7 +64,7 @@ __rvm_apply_patches() {
|
|
64
64
|
|
65
65
|
__rvm_install_source() {
|
66
66
|
[[ -z "$rvm_ruby_selected_flag" ]] && __rvm_select
|
67
|
-
|
67
|
+
|
68
68
|
if [[ "$rvm_ruby_string" = "ruby-1.9.2-head" ]] ; then
|
69
69
|
# Ensure we have a base ruby.
|
70
70
|
__rvm_ensure_has_18_compat_ruby || return 1
|
@@ -86,7 +86,11 @@ __rvm_install_source() {
|
|
86
86
|
$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
|
87
87
|
fi
|
88
88
|
|
89
|
-
|
89
|
+
|
90
|
+
if [[ -d "${rvm_path}/usr" ]] ; then
|
91
|
+
export PATH="${rvm_path}/usr/bin:${PATH}"
|
92
|
+
builtin hash -r
|
93
|
+
fi
|
90
94
|
|
91
95
|
__rvm_apply_patches
|
92
96
|
result="$?"
|
@@ -260,7 +264,7 @@ RubyWrapper
|
|
260
264
|
fi
|
261
265
|
|
262
266
|
\rm -rf "$rvm_ruby_src_path"
|
263
|
-
__rvm_run "extract" "
|
267
|
+
__rvm_run "extract" "gunzip < \"$rvm_archives_path/$rvm_ruby_package_file.$rvm_archive_extension\" | tar xf - -C $rvm_src_path" "Extracting $rvm_ruby_package_file ..."
|
264
268
|
|
265
269
|
result=$? ; if [[ "$result" -gt 0 ]] ; then
|
266
270
|
$rvm_scripts_path/log "error" "There has been an error while trying to extract the source. Aborting the installation." ; __rvm_pushpop ; return $result
|
@@ -320,8 +324,9 @@ RubyWrapper
|
|
320
324
|
unset CFLAGS LDFLAGS ARCHFLAGS # Important.
|
321
325
|
|
322
326
|
unset BUNDLE_PATH GEM_HOME GEM_PATH MY_RUBY_HOME IRBRC
|
323
|
-
|
324
|
-
|
327
|
+
__rvm_remove_rvm_from_path
|
328
|
+
__rvm_conditionally_add_bin_path ; export PATH
|
329
|
+
builtin hash -r
|
325
330
|
|
326
331
|
if [[ -n "$(echo $rvm_ruby_version | awk '/^1\.0/')" ]] && [[ -z "$rvm_head_flag" ]] ; then
|
327
332
|
$rvm_scripts_path/log "info" "Downloading $rvm_ruby_package_file, this may take a while depending on your connection..."
|
@@ -329,7 +334,7 @@ RubyWrapper
|
|
329
334
|
result=$? ; if [[ "$result" -gt 0 ]] ; then
|
330
335
|
$rvm_scripts_path/log "error" "There has been an error while trying to fetch the source. Aborting the installation." ; __rvm_pushpop ; return $result
|
331
336
|
fi
|
332
|
-
__rvm_run "extract" "
|
337
|
+
__rvm_run "extract" "gunzip < \"$rvm_archives_path/$(basename $rvm_ruby_package_file)\" | tar xf - -C $rvm_src_path" "Extracting $rvm_ruby_package_file ..."
|
333
338
|
|
334
339
|
result=$? ; if [[ "$result" -gt 0 ]] ; then
|
335
340
|
$rvm_scripts_path/log "error" "There has been an error while trying to extract the source. Aborting the installation." ; __rvm_pushpop ; return $result
|
@@ -450,7 +455,7 @@ RubyWrapper
|
|
450
455
|
__rvm_inject_gem_env $rvm_ruby_home/bin/$binary
|
451
456
|
done ; unset binary
|
452
457
|
|
453
|
-
__rvm_inject_ruby_shebang "$rvm_ruby_home/bin/rake"
|
458
|
+
__rvm_inject_ruby_shebang "$rvm_ruby_home/bin/rake"
|
454
459
|
|
455
460
|
__rvm_rubygems_setup
|
456
461
|
__rvm_irbrc
|
@@ -459,9 +464,12 @@ RubyWrapper
|
|
459
464
|
|
460
465
|
__rvm_post_install
|
461
466
|
|
462
|
-
|
463
|
-
|
464
|
-
|
467
|
+
# jruby ships with some built in gems, copy them in to place.
|
468
|
+
if [[ -d "$rvm_ruby_home/lib/ruby/gems/1.8" ]]; then
|
469
|
+
$rvm_scripts_path/log "info" "Copying across included gems"
|
470
|
+
cp -R "$rvm_ruby_home/lib/ruby/gems/1.8/" "$GEM_HOME/"
|
471
|
+
fi
|
472
|
+
|
465
473
|
;;
|
466
474
|
|
467
475
|
maglev)
|
@@ -503,7 +511,7 @@ RubyWrapper
|
|
503
511
|
|
504
512
|
builtin cd "$rvm_ruby_src_path"
|
505
513
|
|
506
|
-
__rvm_run "gemstone.extract" "
|
514
|
+
__rvm_run "gemstone.extract" "gunzip < \"$rvm_archives_path/${rvm_gemstone_package_file}.${rvm_archive_extension}\" | tar xf - -C $rvm_ruby_src_path"
|
507
515
|
result=$? ; if [[ "$result" -gt 0 ]] ; then
|
508
516
|
$rvm_scripts_path/log "error" "There has been an error while trying to extract the GemStone package. Aborting the installation." ; __rvm_pushpop ; return $result
|
509
517
|
fi
|
@@ -623,7 +631,7 @@ RubyWrapper
|
|
623
631
|
binaries=(gem irb rdoc rake ri ruby)
|
624
632
|
for binary_name in ${binaries[@]} ; do
|
625
633
|
if [[ -s $rvm_ruby_home/bin/$binary_name ]] ; then
|
626
|
-
|
634
|
+
\tr -d '\r' < "$rvm_ruby_home/bin/$binary_name" > "$rvm_ruby_home/bin/$binary_name.new"
|
627
635
|
#sed -e '1,1s=.*=#!'"/usr/bin/env ir=" "$rvm_ruby_home/bin/$binary_name" > "$rvm_ruby_home/bin/$binary_name.new"
|
628
636
|
mv -f "$rvm_ruby_home/bin/$binary_name.new" "$rvm_ruby_home/bin/$binary_name"
|
629
637
|
chmod +x $rvm_ruby_home/bin/$binary_name
|
@@ -634,15 +642,16 @@ RubyWrapper
|
|
634
642
|
mv -f "$rvm_ruby_home/bin/ir.new" "$rvm_ruby_home/bin/ir"
|
635
643
|
chmod +x $rvm_ruby_home/bin/ir
|
636
644
|
ln -fs $rvm_ruby_home/bin/ir $rvm_ruby_home/bin/ruby
|
637
|
-
|
645
|
+
builtin hash -r
|
638
646
|
__rvm_run "gems.install" "PATH=$rvm_ruby_gem_home/bin:$rvm_ruby_global_gems_path/bin:$rvm_ruby_home/bin:$PATH GEM_HOME=$rvm_ruby_gem_home GEM_PATH=$rvm_ruby_gem_home $rvm_ruby_home/bin/gem install --no-rdoc --no-ri rake $rvm_gem_options" "Installing $rvm_gem_name to $dir"
|
639
647
|
;;
|
640
648
|
|
641
649
|
mput|shyouhei)
|
642
650
|
if [[ "rvm_make_flags_flag" -eq 1 ]] ; then __rvm_make_flags ; fi
|
643
651
|
unset BUNDLE_PATH GEM_HOME GEM_PATH MY_RUBY_HOME IRBRC
|
644
|
-
|
645
|
-
|
652
|
+
__rvm_remove_rvm_from_path
|
653
|
+
__rvm_conditionally_add_bin_path ; export PATH
|
654
|
+
builtin hash -r
|
646
655
|
|
647
656
|
rvm_ruby_home="$rvm_rubies_path/$rvm_ruby_interpreter-$rvm_ruby_version"
|
648
657
|
|
@@ -782,7 +791,7 @@ __rvm_fetch_ruby() {
|
|
782
791
|
\mkdir -p "/tmp/rvm_src_$$"
|
783
792
|
|
784
793
|
if [[ "tar.gz" = "$rvm_archive_extension" ]] || [[ "tgz" = "$rvm_archive_extension" ]] ; then
|
785
|
-
__rvm_run "extract" "
|
794
|
+
__rvm_run "extract" "gunzip < \"$rvm_archives_path/$rvm_ruby_package_file.$rvm_archive_extension\" | tar xf - -C /tmp/rvm_src_$$" "Extracting $rvm_ruby_package_file ..."
|
786
795
|
result=$? ; if [[ "$result" -gt 0 ]] ; then
|
787
796
|
$rvm_scripts_path/log "error" "There has been an error while trying to extract the source. Aborting the installation." ; __rvm_pushpop ; return $result
|
788
797
|
fi
|
@@ -792,7 +801,7 @@ __rvm_fetch_ruby() {
|
|
792
801
|
$rvm_scripts_path/log "error" "There has been an error while trying to extract $rvm_ruby_package_file. Aborting the installation." ; __rvm_pushpop ; return $result
|
793
802
|
fi
|
794
803
|
elif [[ "tar.bz2" = "$rvm_archive_extension" ]] ; then
|
795
|
-
__rvm_run "extract" "
|
804
|
+
__rvm_run "extract" "bunzip2 < \"$rvm_archives_path/$rvm_ruby_package_file.$rvm_archive_extension\" | tar xf - -C /tmp/rvm_src_$$" "Extracting $rvm_ruby_package_file ..."
|
796
805
|
result=$? ; if [[ "$result" -gt 0 ]] ; then
|
797
806
|
$rvm_scripts_path/log "error" "There has been an error while trying to extract the source. Aborting the installation." ; __rvm_pushpop ; return $result
|
798
807
|
fi
|
@@ -1120,7 +1129,7 @@ __rvm_rubygems_setup() {
|
|
1120
1129
|
$rvm_scripts_path/log "error" "There has been an error while trying to fetch the source. Aborting the installation." ; __rvm_pushpop ; return $result
|
1121
1130
|
fi
|
1122
1131
|
\mkdir -p "$rvm_src_path/$rvm_gem_package_name"
|
1123
|
-
__rvm_run "rubygems.extract" "
|
1132
|
+
__rvm_run "rubygems.extract" "gunzip < \"$rvm_archives_path/$rvm_gem_package_name.tgz\" | tar xf - -C $rvm_src_path" "Extracting $rvm_gem_package_name ..."
|
1124
1133
|
fi
|
1125
1134
|
|
1126
1135
|
builtin cd "$rvm_src_path/$rvm_gem_package_name"
|