rvm 0.1.27 → 0.1.29
Sign up to get free protection for your applications and to get access to all the features.
- data/README +50 -44
- data/binscripts/rvm +13 -4
- data/binscripts/rvm-prompt +3 -2
- data/config/db +7 -7
- data/config/md5 +11 -43
- data/help/alias +46 -0
- data/help/benchmark +17 -0
- data/help/debug +8 -0
- data/help/fetch +5 -0
- data/help/gem +0 -0
- data/help/gemdir +0 -0
- data/help/gemset +0 -0
- data/help/implode +0 -0
- data/help/info +0 -0
- data/help/install +0 -0
- data/help/list +0 -0
- data/help/monitor +0 -0
- data/help/notes +0 -0
- data/help/package +0 -0
- data/help/rake +0 -0
- data/help/remove +0 -0
- data/help/reset +0 -0
- data/help/ruby +0 -0
- data/help/rvmrc +0 -0
- data/help/specs +0 -0
- data/help/srcdir +0 -0
- data/help/tests +0 -0
- data/help/uninstall +0 -0
- data/help/update +0 -0
- data/help/use +0 -0
- data/install +21 -9
- data/lib/VERSION.yml +1 -1
- data/rvm.gemspec +30 -5
- data/scripts/cli +108 -79
- data/scripts/db +2 -2
- data/scripts/fetch +2 -2
- data/scripts/gemsets +16 -12
- data/scripts/initialize +2 -1
- data/scripts/install +21 -9
- data/scripts/irbrc.rb +3 -2
- data/scripts/log +1 -1
- data/scripts/manage +62 -49
- data/scripts/monitor +4 -5
- data/scripts/notes +13 -7
- data/scripts/package +34 -5
- data/scripts/rvm +10 -2
- data/scripts/rvm-install +21 -9
- data/scripts/selector +25 -17
- data/scripts/set +7 -9
- data/scripts/update +21 -9
- data/scripts/utility +95 -73
- metadata +38 -6
data/scripts/gemsets
CHANGED
@@ -5,7 +5,8 @@ source $rvm_scripts_path/selector
|
|
5
5
|
|
6
6
|
if [[ ! -z "$rvm_trace_flag" ]] ; then set -x ; export rvm_trace_flag ; fi
|
7
7
|
rvm_ruby_gem_home="${rvm_ruby_gem_home:-$GEM_HOME}"
|
8
|
-
|
8
|
+
|
9
|
+
if [[ ! -d "$rvm_ruby_gem_home" ]] && command -v gem > /dev/null 2>&1; then rvm_ruby_gem_home="$(gem env home)" ; fi
|
9
10
|
|
10
11
|
trap "if [[ -d $rvm_tmp_path/ ]] && [[ -s $rvm_tmp_path/$$ ]] ; then rm -f $rvm_tmp_path/$$ > /dev/null 2>&1 ; fi ; exit" 0 1 2 3 15
|
11
12
|
|
@@ -69,12 +70,12 @@ __rvm_gemset_delete() {
|
|
69
70
|
}
|
70
71
|
|
71
72
|
__rvm_gemset_empty() {
|
72
|
-
if [[ -z "$
|
73
|
+
if [[ -z "$rvm_ruby_gem_home" ]] ; then __rvm_select ; fi
|
73
74
|
gemdir="$rvm_ruby_gem_home"
|
74
75
|
if [[ -d "$gemdir" ]] && [[ "$gemdir" != '/' ]] && [[ ! -z "$rvm_force_flag" ]] ; then
|
75
76
|
cd $gemdir && rm -rf ./bin/* ./doc/* ./gems/* ./specifications/*
|
76
77
|
elif [[ -d "$gemdir" ]] ; then
|
77
|
-
$rvm_scripts_path/log "warn" "Are you SURE you wish to remove the installed gemset for gemset '$
|
78
|
+
$rvm_scripts_path/log "warn" "Are you SURE you wish to remove the installed gemset for gemset '$(basename $gemdir)' ($gemdir)?"
|
78
79
|
echo -n "(anything other than 'yes' will cancel) > "
|
79
80
|
read response
|
80
81
|
if [[ "yes" = "$response" ]] ; then
|
@@ -97,14 +98,14 @@ __rvm_gemset_copy() {
|
|
97
98
|
if [[ -z "$destination_ruby" ]] ; then
|
98
99
|
$rvm_scripts_path/log "error" "Source and destination must be specified: 'rvm gemset copy X Y'"
|
99
100
|
fi
|
100
|
-
source_path="$(
|
101
|
-
destination_path="$(
|
102
|
-
|
101
|
+
source_path="$(rvm $source_ruby gem env gemdir | tail -n 1)"
|
102
|
+
destination_path="$(rvm $destination_ruby gem env gemdir | tail -n 1)"
|
103
103
|
if [[ -d "$source_path" ]] ; then
|
104
104
|
if [[ ! -d "$destination_path" ]] ; then mkdir -p $destination_path ; fi
|
105
105
|
$rvm_scripts_path/log "info" "Copying gemset from $source_ruby to $destination_ruby" ;
|
106
106
|
for dir in bin doc gems specifications ; do
|
107
|
-
|
107
|
+
mkdir -p "$destination_path/$dir"
|
108
|
+
cp -Rf "$source_path/$dir" "$destination_path/"
|
108
109
|
done
|
109
110
|
else
|
110
111
|
$rvm_scripts_path/log "error" "Gems directory does not exist for $source_path ($source_path)"
|
@@ -226,6 +227,7 @@ __rvm_parse_gems_args() {
|
|
226
227
|
# Install a gem
|
227
228
|
__rvm_gem_install() {
|
228
229
|
# First we parse the gem args to pick apart the pieces.
|
230
|
+
|
229
231
|
__rvm_parse_gems_args
|
230
232
|
|
231
233
|
# Now we determine if a .gem cache file is already installed
|
@@ -274,16 +276,18 @@ __rvm_gem_install() {
|
|
274
276
|
if [[ "rvm_make_flags_flag" -eq 1 ]] ; then __rvm_make_flags ; fi
|
275
277
|
|
276
278
|
if [[ ! -z "$rvm_ruby_gem_home" ]] && [[ "$rvm_ruby_gem_home" != "$rvm_gems_path" ]] ; then
|
277
|
-
command="GEM_HOME='$rvm_ruby_gem_home' GEM_PATH='$rvm_ruby_gem_home/bin:$rvm_gems_path/${rvm_ruby_string}${rvm_gemset_separator}global/bin' BUNDLE_PATH='${rvm_ruby_gem_home}' ${gem_prefix} gem install --ignore-dependencies $gems_args $rvm_gem_options $gem_postfix $vars"
|
279
|
+
#command="GEM_HOME='$rvm_ruby_gem_home' GEM_PATH='$rvm_ruby_gem_home/bin:$rvm_gems_path/${rvm_ruby_string}${rvm_gemset_separator}global/bin' BUNDLE_PATH='${rvm_ruby_gem_home}' ${gem_prefix} gem install --ignore-dependencies $gems_args $rvm_gem_options $gem_postfix $vars"
|
280
|
+
command="GEM_HOME='$rvm_ruby_gem_home' GEM_PATH='$rvm_ruby_gem_home/bin:$rvm_gems_path/${rvm_ruby_string}${rvm_gemset_separator}global/bin' BUNDLE_PATH='${rvm_ruby_gem_home}' ${gem_prefix} gem install $gems_args $rvm_gem_options $gem_postfix $vars"
|
278
281
|
else
|
282
|
+
#--ignore-dependencies
|
279
283
|
command="$gem_prefix gem install --ignore-dependencies $gems_args $rvm_gem_options -q $gem $gem_postfix $vars"
|
280
284
|
fi
|
281
|
-
__rvm_run "gem.install" "$command" "$gem_name $gem_version
|
285
|
+
__rvm_run "gem.install" "$command" "installing ${gem_name} ${gem_version}..."
|
282
286
|
result=$?
|
283
287
|
if [[ $result -eq 0 ]] ; then
|
284
|
-
$rvm_scripts_path/log "info" "$gem_name $gem_version installed."
|
288
|
+
$rvm_scripts_path/log "info" "$gem_name $gem_version installed, output logged to:\n$rvm_path/log/$rvm_ruby_string/gem.install.log"
|
285
289
|
else
|
286
|
-
$rvm_scripts_path/log "error" "$gem_name $gem_version failed to install, output
|
290
|
+
$rvm_scripts_path/log "error" "$gem_name $gem_version failed to install, output logged to:\n$rvm_path/log/$rvm_ruby_string/gem.install.error.log"
|
287
291
|
fi
|
288
292
|
fi ; unset gem gem_prefix gem_name gem_version gem_file_name gem_postfix cache_file gem_file_name gem_string gem_action
|
289
293
|
|
@@ -307,7 +311,7 @@ __rvm_gemset_gemdir() {
|
|
307
311
|
|
308
312
|
unset GEM_PATH
|
309
313
|
|
310
|
-
if
|
314
|
+
if ! command -v gem > /dev/null ; then
|
311
315
|
$rvm_scripts_path/log "error" "'gem' was not found, cannot perform gem actions (Do you have an RVM ruby selected?)"
|
312
316
|
exit 1
|
313
317
|
fi
|
data/scripts/initialize
CHANGED
@@ -14,6 +14,7 @@ rvm_project_rvmrc_default="${rvm_project_rvmrc_default:-0}"
|
|
14
14
|
rvm_archives_path="${rvm_archives_path:-"$rvm_path/archives"}"
|
15
15
|
rvm_src_path="${rvm_src_path:-"$rvm_path/src"}"
|
16
16
|
rvm_log_path="${rvm_log_path:-"$rvm_path/log"}"
|
17
|
+
rvm_docs_path="${rvm_docs_path:-"$rvm_path/docs"}"
|
17
18
|
rvm_bin_path="${rvm_bin_path:-"$rvm_path/bin"}"
|
18
19
|
rvm_gems_path="${rvm_gems_path:-"$rvm_path/gems"}"
|
19
20
|
rvm_gems_cache_path="${rvm_gems_cache_path:-"$rvm_gems_path/cache"}"
|
@@ -25,5 +26,5 @@ rvm_usr_path="${rvm_usr_path:-"$rvm_path/usr"}"
|
|
25
26
|
rvm_symlink_path="${rvm_symlink_path:-$rvm_prefix/bin}"
|
26
27
|
rvm_gemset_separator="${rvm_gemset_separator:-"@"}"
|
27
28
|
|
28
|
-
export rvm_path rvm_rubies_path rvm_scripts_path rvm_archives_path rvm_src_path rvm_log_path rvm_bin_path rvm_gems_path rvm_config_path rvm_tmp_path rvm_hooks_path rvm_gems_cache_path rvm_gemset_separator
|
29
|
+
export rvm_path rvm_rubies_path rvm_scripts_path rvm_archives_path rvm_src_path rvm_log_path rvm_bin_path rvm_gems_path rvm_config_path rvm_tmp_path rvm_hooks_path rvm_gems_cache_path rvm_gemset_separator rvm_symlink_path
|
29
30
|
|
data/scripts/install
CHANGED
@@ -29,7 +29,7 @@ spinner() {
|
|
29
29
|
index=$((($spinner_counter % 8)))
|
30
30
|
echo -e -n "\r${array[$index]}"
|
31
31
|
let "spinner_counter=spinner_counter+1"
|
32
|
-
|
32
|
+
command -v perl > /dev/null 2>&1 && perl -e 'sleep 0.5'
|
33
33
|
}
|
34
34
|
|
35
35
|
if echo "$*" | grep -q 'trace' ; then echo "$*" ; env | grep '^rvm_' ; set -x ; fi
|
@@ -56,6 +56,7 @@ fi
|
|
56
56
|
if [[ -z "$rvm_path" ]] ; then rvm_path="${rvm_prefix}rvm" ; fi
|
57
57
|
|
58
58
|
source scripts/initialize
|
59
|
+
|
59
60
|
if grep -q 'scripts/rvm' $HOME/.bash* || grep -q 'scripts/rvm' $HOME/.zsh*; then
|
60
61
|
if [[ -d "$rvm_path" ]] && [[ -s "${rvm_path}/scripts/rvm" ]] ; then
|
61
62
|
export upgrade_flag=1
|
@@ -102,7 +103,7 @@ fi
|
|
102
103
|
|
103
104
|
spinner
|
104
105
|
|
105
|
-
mkdir -p $rvm_archives_path $rvm_src_path $rvm_log_path $rvm_bin_path $rvm_gems_path $rvm_rubies_path $rvm_config_path $rvm_hooks_path $rvm_tmp_path
|
106
|
+
mkdir -p $rvm_archives_path $rvm_src_path $rvm_log_path $rvm_bin_path $rvm_gems_path $rvm_rubies_path $rvm_config_path $rvm_hooks_path $rvm_tmp_path
|
106
107
|
|
107
108
|
for file in README LICENCE ; do
|
108
109
|
spinner
|
@@ -112,7 +113,7 @@ done
|
|
112
113
|
#
|
113
114
|
# Scripts
|
114
115
|
#
|
115
|
-
for dir_name in config scripts examples lib hooks ; do
|
116
|
+
for dir_name in config scripts examples lib hooks help ; do
|
116
117
|
spinner
|
117
118
|
mkdir -p "$rvm_path/$dir_name"
|
118
119
|
if [[ -d "$source_path/$dir_name" ]] ; then
|
@@ -265,17 +266,28 @@ if [[ "$upgrade_flag" -eq 1 ]] ; then
|
|
265
266
|
else
|
266
267
|
if [[ "root" != "$(whoami)" ]] ; then
|
267
268
|
echo -e "\n$(tput setaf 1)You must now finish the install manually:$(tput sgr0)"
|
268
|
-
echo -e "\n1) Place the folowing line at the end of your shell's loading files(.bashrc
|
269
|
+
echo -e "\n1) Place the folowing line at the end of your shell's loading files(.bashrc or .bash_profile for bash and .zshrc for zsh), after all path/variable settings:"
|
269
270
|
echo -e "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
|
270
271
|
echo -e "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
|
271
|
-
echo -e "\n This means that if you see '[ -z "$PS1" ] && return' then you must
|
272
|
-
echo -e "\n
|
273
|
-
echo -e "\n
|
272
|
+
echo -e "\n This means that if you see '[ -z "$PS1" ] && return' then you must change this line to:"
|
273
|
+
echo -e "\n if [[ ! -z "$PS1" ]] ; then"
|
274
|
+
echo -e "\n ... original content that was below the && return line ..."
|
275
|
+
echo -e "\n fi # <= be sure to close the if."
|
276
|
+
echo -e "\n #EOF .bashrc"
|
277
|
+
echo -e "\n Be absolutely *sure* to REMOVE the '&& return'."
|
274
278
|
echo -e "\n If you wish to DRY up your config you can 'source ~/.bashrc' at the top of your .bash_profile."
|
275
|
-
echo -e "\
|
279
|
+
echo -e "\n placing all non-interactive items in the .bashrc"
|
280
|
+
echo -e "\n3) Then $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
|
276
281
|
fi
|
277
282
|
if [[ -s $HOME/.bashrc ]] && grep '&& return' $HOME/.bashrc ; then
|
278
|
-
echo -e "\n\nWARNING: you have a 'return' statement in your .bashrc, likely this will cause untold havoc.
|
283
|
+
echo -e "\n\nWARNING: you have a 'return' statement in your .bashrc, likely this will cause untold havoc.
|
284
|
+
This means that if you see '[ -z "$PS1" ] && return' then you must change this line to:
|
285
|
+
if [[ ! -z "$PS1" ]] ; then
|
286
|
+
... original content that was below the && return line ...
|
287
|
+
fi # <= be sure to close the if.
|
288
|
+
#EOF .bashrc
|
289
|
+
|
290
|
+
If you have any questions about this please visit #rvm on irc.freenode.net.\n"
|
279
291
|
fi
|
280
292
|
echo -e "Installation of RVM to $rvm_path/ is complete.\n\n"
|
281
293
|
fi
|
data/scripts/irbrc.rb
CHANGED
@@ -24,10 +24,11 @@ IRB.conf[:PROMPT][:RVM] = @prompt
|
|
24
24
|
IRB.conf[:PROMPT_MODE] = :RVM
|
25
25
|
|
26
26
|
# Load the user's irbrc file, if possible.
|
27
|
+
# Report any errors that occur.
|
27
28
|
begin
|
28
29
|
load File.join(ENV["HOME"], ".irbrc") if File.exists?("#{ENV["HOME"]}/.irbrc")
|
30
|
+
rescue LoadError => load_error
|
31
|
+
puts load_error
|
29
32
|
rescue => exception
|
30
33
|
puts "Error : 'load #{ENV["HOME"]}/.irbrc' : #{exception.message}"
|
31
34
|
end
|
32
|
-
|
33
|
-
# EOF
|
data/scripts/log
CHANGED
@@ -6,7 +6,7 @@ if [[ ! -z "$2" ]] ; then level=$1 ; shift ; else level="info" ; fi
|
|
6
6
|
|
7
7
|
message=$1
|
8
8
|
|
9
|
-
if [[ -z "$rvm_interactive" ]] || [[ -z "$TERM" ]] ; then
|
9
|
+
if [[ -z "$rvm_interactive" ]] || [[ -z "$TERM" ]] || [[ "unknown" = "$TERM" ]] ; then
|
10
10
|
case "$level" in
|
11
11
|
debug) shift ; echo -e "<d>$message </d>" ;;
|
12
12
|
info) shift ; echo -e "<i>$message </i>" ;;
|
data/scripts/manage
CHANGED
@@ -32,7 +32,7 @@ __rvm_install_source() {
|
|
32
32
|
if [[ -d "${rvm_path}/usr" ]] ; then export PATH="${rvm_path}/usr/bin:${PATH}" ; fi
|
33
33
|
|
34
34
|
if [[ -z "$rvm_ruby_configure" ]] && [[ ! -s "$rvm_ruby_src_path/configure" ]] ; then
|
35
|
-
if
|
35
|
+
if command -v autoconf > /dev/null ; then
|
36
36
|
__rvm_run "autoconf" "autoconf" "Running autoconf"
|
37
37
|
else
|
38
38
|
result=$? ; $rvm_scripts_path/log "fail" "rvm requires autoconf to install the selected ruby interpreter however autoconf was not found in the PATH." ; return $result
|
@@ -141,16 +141,16 @@ __rvm_install_ruby() {
|
|
141
141
|
__rvm_run "macruby/extract" "sudo /usr/sbin/installer -pkg '$rvm_archives_path/macruby_nightly.pkg' -target '/'"
|
142
142
|
mkdir -p "$rvm_ruby_home/bin"
|
143
143
|
else
|
144
|
-
macruby_path="/Library/Frameworks/MacRuby.framework/Versions/
|
144
|
+
macruby_path="/Library/Frameworks/MacRuby.framework/Versions/${rvm_ruby_version}/usr/bin"
|
145
145
|
# TODO: Separated nightly from head.
|
146
|
-
$rvm_scripts_path/log "info" "Retrieving MacRuby
|
146
|
+
$rvm_scripts_path/log "info" "Retrieving MacRuby ${rvm_ruby_version} ..."
|
147
147
|
$rvm_scripts_path/fetch "$rvm_url"
|
148
148
|
result=$? ; if [[ "$result" -gt 0 ]] ; then
|
149
149
|
$rvm_scripts_path/log "error" "There has been an error while trying to fetch the source. Aborting the installation." ; __rvm_pushpop ; return $result
|
150
150
|
fi
|
151
151
|
mkdir -p $rvm_ruby_src_path
|
152
|
-
unzip -o -j "$rvm_archives_path/$rvm_ruby_package_file" "MacRuby
|
153
|
-
mv "$rvm_ruby_src_path/MacRuby
|
152
|
+
unzip -o -j "$rvm_archives_path/$rvm_ruby_package_file" "MacRuby ${rvm_ruby_version}/MacRuby ${rvm_ruby_version}.pkg" -d "$rvm_ruby_src_path"
|
153
|
+
mv "$rvm_ruby_src_path/MacRuby ${rvm_ruby_version}.pkg" "$rvm_ruby_src_path/$rvm_ruby_string.pkg"
|
154
154
|
__rvm_run "macruby/extract" "sudo /usr/sbin/installer -pkg '$rvm_ruby_src_path/$rvm_ruby_string.pkg' -target '/'"
|
155
155
|
mkdir -p "$rvm_ruby_home/bin"
|
156
156
|
fi
|
@@ -220,7 +220,8 @@ RubyWrapper
|
|
220
220
|
rvm_ree_options="${rvm_ree_options} --no-tcmalloc"
|
221
221
|
fi
|
222
222
|
|
223
|
-
|
223
|
+
|
224
|
+
__rvm_run "install" "./installer -a $rvm_rubies_path/$rvm_ruby_interpreter-$rvm_ruby_version-$rvm_ruby_patch_level $rvm_ree_options --dont-install-useful-gems $rvm_ruby_configure_flags --no-dev-docs" "Installing $rvm_ruby_string, this may take a while, depending on your cpu(s)..."
|
224
225
|
result=$? ; if [[ "$result" -gt 0 ]] ; then
|
225
226
|
$rvm_scripts_path/log "error" "There has been an error while trying to run the ree installer. Aborting the installation." ; __rvm_pushpop ; return $result
|
226
227
|
fi
|
@@ -332,18 +333,7 @@ RubyWrapper
|
|
332
333
|
for binary_name in "gem" ; do
|
333
334
|
if [[ $binary_name != "gem" ]] ; then prefix="-S " ; else unset prefix; fi
|
334
335
|
|
335
|
-
ruby_wrapper=$(
|
336
|
-
#!/usr/bin/env bash
|
337
|
-
|
338
|
-
export GEM_HOME="$rvm_ruby_gem_home"
|
339
|
-
export GEM_PATH="$rvm_ruby_gem_path"
|
340
|
-
export BUNDLE_PATH="$rvm_ruby_gem_home"
|
341
|
-
export MY_RUBY_HOME="$rvm_ruby_home"
|
342
|
-
export PATH="$rvm_ruby_home/bin:$rvm_ruby_gem_home/bin:$rvm_ruby_global_gems_path/bin:\$PATH"
|
343
|
-
|
344
|
-
exec $rvm_ruby_home/bin/rbx $prefix$binary_name "\$@"
|
345
|
-
RubyWrapper
|
346
|
-
)
|
336
|
+
ruby_wrapper=$(echo -e "#!/usr/bin/env bash\nexec $rvm_ruby_home/bin/rbx $prefix$binary_name \"\$@\"")
|
347
337
|
for file_name in "$rvm_ruby_home/bin/$binary_name" "$rvm_bin_path/$binary_name-$rvm_ruby_string" ; do
|
348
338
|
rm -f $file_name
|
349
339
|
echo "$ruby_wrapper" > $file_name
|
@@ -360,7 +350,7 @@ RubyWrapper
|
|
360
350
|
;;
|
361
351
|
|
362
352
|
jruby)
|
363
|
-
if !
|
353
|
+
if ! command -v java > /dev/null; then
|
364
354
|
echo -e "java must be installed and in your path in order to install JRuby." ; return 1
|
365
355
|
fi
|
366
356
|
|
@@ -383,6 +373,7 @@ RubyWrapper
|
|
383
373
|
__rvm_pushpop
|
384
374
|
|
385
375
|
if [[ -z "$rvm_ruby_home" ]] || [[ "$rvm_ruby_home" = "/" ]] ; then echo "WTH?!?! rvm_ruby_home == / ??? not removing." ; return 1000000 ; fi
|
376
|
+
|
386
377
|
rm -rf $rvm_ruby_home
|
387
378
|
__rvm_run "install" "/bin/cp -Rf $rvm_ruby_src_path $rvm_ruby_home" "Installing JRuby to $rvm_ruby_home"
|
388
379
|
|
@@ -392,6 +383,10 @@ RubyWrapper
|
|
392
383
|
done ; unset binary
|
393
384
|
__rvm_pushpop
|
394
385
|
|
386
|
+
sed -e 's#^JAVA_VM=-client#JAVA_VM=-server#' $rvm_ruby_home/bin/jruby > $rvm_ruby_home/bin/jruby.new &&
|
387
|
+
mv $rvm_ruby_home/bin/jruby.new $rvm_ruby_home/bin/jruby
|
388
|
+
chmod +x $rvm_ruby_home/bin/jruby
|
389
|
+
|
395
390
|
for binary in jrubyc jirb_swing jirb jgem rdoc ri spec autospec testrb ast generate_yaml_index.rb ; do
|
396
391
|
__rvm_inject_gem_env $rvm_ruby_home/bin/$binary
|
397
392
|
done ; unset binary
|
@@ -497,7 +492,7 @@ RubyWrapper
|
|
497
492
|
;;
|
498
493
|
|
499
494
|
ironruby|ir)
|
500
|
-
if !
|
495
|
+
if ! command -v mono > /dev/null ; then
|
501
496
|
echo -e "mono must be installed and in your path in order to install IronRuby." ; return 1
|
502
497
|
fi
|
503
498
|
|
@@ -518,46 +513,60 @@ RubyWrapper
|
|
518
513
|
|
519
514
|
__rvm_fetch_ruby
|
520
515
|
if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
|
516
|
+
builtin cd $rvm_ruby_src_path
|
517
|
+
|
518
|
+
$rvm_bin_path/rvm 1.8.7 -S gem install pathname2 --no-rdoc --no-ri
|
519
|
+
|
520
|
+
# MONO_LIB=/Library/Frameworks/Mono.framework/Versions/current/lib/
|
521
|
+
rvm_ruby_make="$rvm_bin_path/rvm 1.8.7 -S rake MERLIN_ROOT=\"$rvm_ruby_src_path/Merlin/Main\" compile mono=1 configuration=release --trace"
|
522
|
+
__rvm_run "rake" "$rvm_ruby_make" "Building IronRuby..."
|
523
|
+
if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
|
524
|
+
|
525
|
+
rm -rf $rvm_ruby_home/*
|
526
|
+
mkdir -p $rvm_ruby_home/bin $rvm_ruby_home/lib $rvm_ruby_home/lib/ruby $rvm_ruby_home/lib/IronRuby
|
527
|
+
|
528
|
+
cp -r $rvm_ruby_src_path/Merlin/Main/Bin/mono_release/* $rvm_ruby_home/bin/
|
529
|
+
cp -r $rvm_ruby_src_path/Merlin/Main/Languages/Ruby/Scripts/bin/* $rvm_ruby_home/bin/
|
530
|
+
cp -r $rvm_ruby_src_path/Merlin/External.LCA_RESTRICTED/Languages/Ruby/redist-libs/ruby/* $rvm_ruby_home/lib/ruby
|
531
|
+
cp -r $rvm_ruby_src_path/Merlin/Main/Languages/Ruby/Libs/* $rvm_ruby_home/lib/IronRuby
|
521
532
|
else
|
522
533
|
$rvm_scripts_path/log "info" "Retrieving IronRuby"
|
534
|
+
|
523
535
|
$rvm_scripts_path/fetch "$rvm_url" "$rvm_ruby_package_file"
|
524
536
|
result=$? ; if [[ "$result" -gt 0 ]] ; then
|
525
537
|
$rvm_scripts_path/log "error" "There has been an error while trying to fetch the source. Aborting the installation." ; __rvm_pushpop ; return $result
|
526
538
|
fi
|
527
539
|
|
528
|
-
|
529
|
-
|
530
|
-
|
540
|
+
mkdir -p $rvm_ruby_src_path $rvm_ruby_home
|
541
|
+
unzip -o -d ${rvm_ruby_src_path} ${rvm_archives_path}/${rvm_ruby_package_file} >> "$rvm_ruby_log_path/extract.log" 2>> "$rvm_ruby_log_path/extract.error.log"
|
542
|
+
result=$? ; if [[ "$result" -gt 1 ]] ; then
|
543
|
+
$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
|
531
544
|
fi
|
532
545
|
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
#mv $rvm_ruby_home/ironruby/* $rvm_ruby_home
|
537
|
-
#rm -rf $rvm_ruby_home/ironruby
|
538
|
-
#mv $rvm_ruby_src_path/$rvm_ruby_package_file/* $rvm_ruby_home
|
539
|
-
#mv $rvm_ruby_home/lib/ironruby $rvm_ruby_home/lib/IronRuby
|
546
|
+
for dir in bin lib silverlight ; do
|
547
|
+
cp -Rf $rvm_src_path/$rvm_ruby_string/$dir "$rvm_ruby_home/$dir"
|
548
|
+
done
|
540
549
|
fi
|
541
550
|
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
551
|
+
binaries=(gem irb rdoc rake ri ruby)
|
552
|
+
for binary_name in ${binaries[@]} ; do
|
553
|
+
if [[ -s $rvm_ruby_home/bin/$binary_name ]] ; then
|
554
|
+
cat "$rvm_ruby_home/bin/$binary_name" | tr -d '\r' > "$rvm_ruby_home/bin/$binary_name.new"
|
555
|
+
#sed -e '1,1s=.*=#!'"/usr/bin/env ir=" "$rvm_ruby_home/bin/$binary_name" > "$rvm_ruby_home/bin/$binary_name.new"
|
556
|
+
mv -f "$rvm_ruby_home/bin/$binary_name.new" "$rvm_ruby_home/bin/$binary_name"
|
557
|
+
chmod +x $rvm_ruby_home/bin/$binary_name
|
558
|
+
fi
|
559
|
+
done
|
550
560
|
|
551
|
-
|
552
|
-
|
561
|
+
sed -e '1,1s=.*=#!'"/usr/bin/env bash=" "$rvm_ruby_home/bin/ir" | tr -d '\r' > "$rvm_ruby_home/bin/ir.new"
|
562
|
+
mv -f "$rvm_ruby_home/bin/ir.new" "$rvm_ruby_home/bin/ir"
|
563
|
+
chmod +x $rvm_ruby_home/bin/ir
|
564
|
+
ln -fs $rvm_ruby_home/bin/ir $rvm_ruby_home/bin/ruby
|
553
565
|
|
554
|
-
|
555
|
-
cp -r $rvm_ruby_src_path/Merlin/Main/Languages/Ruby/Scripts/bin/* $rvm_ruby_home/bin/
|
556
|
-
cp -r $rvm_ruby_src_path/Merlin/External.LCA_RESTRICTED/Languages/Ruby/redist-libs/ruby/* $rvm_ruby_home/lib/ruby
|
557
|
-
cp -r $rvm_ruby_src_path/Merlin/Main/Languages/Ruby/Libs/* $rvm_ruby_home/lib/IronRuby
|
566
|
+
__rvm_run "gems.install" "PATH=$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"
|
558
567
|
|
559
|
-
binaries=
|
560
|
-
for binary_name in $
|
568
|
+
binaries=() # Don't wrap any longer.
|
569
|
+
for binary_name in ${binaries[@]} ; do
|
561
570
|
binary_path=""
|
562
571
|
if [[ "ruby" != "$binary_name" ]] ; then
|
563
572
|
binary_path="$rvm_ruby_home/bin/i$binary_name"
|
@@ -607,7 +616,7 @@ RubyWrapper
|
|
607
616
|
fi
|
608
617
|
|
609
618
|
if [[ ! -s "$rvm_ruby_src_path/configure" ]] ; then
|
610
|
-
if
|
619
|
+
if command -v autoconf &> /dev/null ; then
|
611
620
|
__rvm_run "autoconf" "autoconf" "Running autoconf"
|
612
621
|
else
|
613
622
|
$rvm_scripts_path/log "fail" "rvm expects autoconf to install this ruby interpreter, autoconf was not found in PATH. Aborting installation." ; result=$? ; return $result
|
@@ -669,6 +678,8 @@ RubyWrapper
|
|
669
678
|
|
670
679
|
esac
|
671
680
|
|
681
|
+
$rvm_scripts_path/hook "after_install"
|
682
|
+
|
672
683
|
if [[ ! -z "$ruby_options" ]] ; then RUBYOPT=$ruby_options ; export RUBYOPT ; fi
|
673
684
|
}
|
674
685
|
|
@@ -816,10 +827,12 @@ __rvm_remove_ruby() {
|
|
816
827
|
else
|
817
828
|
$rvm_scripts_path/log "info" "it seems that $dir/$rvm_ruby_string is already non existent."
|
818
829
|
fi
|
830
|
+
|
819
831
|
if [[ -e $rvm_bin_path/$rvm_ruby_string ]] ; then
|
820
832
|
rm -f $rvm_bin_path/$rvm_ruby_string
|
821
833
|
fi
|
822
|
-
|
834
|
+
|
835
|
+
if grep -q "$rvm_ruby_string" "$rvm_config_path/default" 2>/dev/null ; then
|
823
836
|
rm -f "$rvm_config_path/default"
|
824
837
|
fi
|
825
838
|
done ; unset dir
|
@@ -859,7 +872,7 @@ __rvm_post_install() {
|
|
859
872
|
for dir in $rvm_ruby_global_gems_path $rvm_ruby_gem_home ; do
|
860
873
|
GEM_HOME="$dir" ; GEM_PATH="$dir" ; BUNDLE_PATH="$dir"
|
861
874
|
export GEM_HOME GEM_PATH BUNDLE_PATH
|
862
|
-
__rvm_run "gems.install" "$rvm_ruby_home/bin/gem install --no-rdoc --no-ri $rvm_gem_name $rvm_gem_options" "Installing $rvm_gem_name"
|
875
|
+
__rvm_run "gems.install" "$rvm_ruby_home/bin/gem install --no-rdoc --no-ri $rvm_gem_name $rvm_gem_options" "Installing $rvm_gem_name to $dir"
|
863
876
|
|
864
877
|
if [[ -x $rvm_ruby_gem_home/bin/$rvm_gem_name ]] ; then
|
865
878
|
if [[ "$rvm_ruby_gem_home" != "$rvm_ruby_home" ]] && [[ ! -x $rvm_ruby_home/bin/$rvm_gem_name ]] ; then
|
data/scripts/monitor
CHANGED
@@ -62,12 +62,11 @@ while : ; do
|
|
62
62
|
if [[ "spec" = "$framework" ]] ; then
|
63
63
|
rvm_action="spec"
|
64
64
|
rvm_ruby_args="spec/spec_helper.rb ${changed_spec_files[*]}"
|
65
|
-
|
66
|
-
|
65
|
+
$rvm_scripts_path/set $rvm_action $rvm_ruby_args
|
67
66
|
elif [[ "test" = "$framework" ]] ; then
|
68
67
|
rvm_action="ruby"
|
69
68
|
rvm_ruby_args=" -r$(echo "${changed_test_files[*]}" | sed 's/ / -r/g') test/test_helper.rb"
|
70
|
-
|
69
|
+
$rvm_scripts_path/set $rvm_action $rvm_ruby_args
|
71
70
|
fi
|
72
71
|
update=1
|
73
72
|
fi
|
@@ -78,11 +77,11 @@ while : ; do
|
|
78
77
|
if [[ "spec" = "$framework" ]] ; then
|
79
78
|
rvm_action="spec"
|
80
79
|
rvm_ruby_args="spec/"
|
81
|
-
|
80
|
+
$rvm_scripts_path/set $rvm_action $rvm_ruby_args
|
82
81
|
elif [[ "test" = "$framework" ]] ; then
|
83
82
|
rvm_action="rake"
|
84
83
|
rvm_ruby_args="test"
|
85
|
-
|
84
|
+
$rvm_scripts_path/set $rvm_action $rvm_ruby_args
|
86
85
|
fi
|
87
86
|
update=1
|
88
87
|
fi
|
data/scripts/notes
CHANGED
@@ -9,37 +9,43 @@ if [[ "Linux" = "$system" ]] ; then
|
|
9
9
|
done
|
10
10
|
echo -e "\n$(tput setaf 2)Notes for ${system} $release$(tput sgr0)\n"
|
11
11
|
|
12
|
-
rvm_apt_get_binary="$(
|
13
|
-
rvm_emerge_binary="$(
|
14
|
-
rvm_pacman_binary="$(
|
15
|
-
rvm_yum_binary="$(
|
12
|
+
rvm_apt_get_binary="$(command -v aptitude)"
|
13
|
+
rvm_emerge_binary="$(command -v emerge)"
|
14
|
+
rvm_pacman_binary="$(command -v pacman)"
|
15
|
+
rvm_yum_binary="$(command -v yum)"
|
16
16
|
|
17
17
|
echo -e "\n $item curl is required.\n"
|
18
18
|
echo -e "\n $item patch is required (for ree, some ruby head's).\n"
|
19
19
|
if [[ ! -z "$rvm_apt_get_binary" ]] ; then
|
20
20
|
echo -e " $item For JRuby (if you wish to use it) you will need:"
|
21
21
|
echo -e "\n $ aptitude install curl sun-java6-bin sun-java6-jre sun-java6-jdk"
|
22
|
+
|
22
23
|
echo -e "\n $item For MRI & ree (if you wish to use it) you will need:"
|
23
|
-
echo -e "\n $ aptitude install curl bison build-essential zlib1g-dev libssl-dev libreadline5-dev libxml2-dev git-core"
|
24
|
+
echo -e "\n $ aptitude install curl bison build-essential zlib1g zlib1g-dev libssl-dev libreadline5-dev libreadline6-dev libxml2-dev git-core subversion"
|
25
|
+
|
24
26
|
echo -e "\n $item For IronRuby (if you wish to use it) you will need:"
|
25
27
|
echo -e "\n $ aptitude install curl mono-2.0-devel"
|
26
28
|
|
27
29
|
elif [[ ! -z "$rvm_emerge_binary" ]] ; then
|
28
30
|
echo -e " $item For JRuby (if you wish to use it) you will need:"
|
29
31
|
echo -e "\n $ emerge dev-java/sun-jdk dev-java/sun-jre-bin"
|
32
|
+
|
30
33
|
echo -e "\n $item For IronRuby (if you wish to use it) you will need:"
|
31
34
|
echo -e "\n $ emerge dev-lang/mono"
|
32
35
|
|
33
36
|
elif [[ ! -z "$rvm_pacman_binary" ]] ; then
|
34
37
|
echo -e " $item For JRuby (if you wish to use it) you will need:"
|
35
38
|
echo -e "\n $ pacman -Sy jdk jre curl"
|
39
|
+
|
36
40
|
echo -e "\n $item For IronRuby (if you wish to use it) you will need:"
|
37
41
|
echo -e "\n $ pacman -Sy mono"
|
38
42
|
|
39
43
|
elif [[ ! -z "$rvm_yum_binary" ]] ; then
|
40
44
|
echo -e " $item For MRI/ree (if you wish to use it) you will need:"
|
41
|
-
echo -e "\n $ yum install -y gcc-c++ patch readline readline-devel
|
42
|
-
echo -e "
|
45
|
+
echo -e "\n $ yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel"
|
46
|
+
echo -e "\n $ yum install -y iconv-devel # NOTE: For centos 5.4 final iconv-devel might not be available :("
|
47
|
+
|
48
|
+
echo -e "\n $item For JRuby (if you wish to use it) you will need:"
|
43
49
|
echo -e "\n $ yum install -y java"
|
44
50
|
|
45
51
|
else
|