summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
Diffstat (limited to 'tool')
-rwxr-xr-xtool/rbinstall.rb24
1 files changed, 12 insertions, 12 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index 4263cdaced..cf5827e6e2 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -424,18 +424,18 @@ install?(:local, :comm, :bin, :'bin-comm') do
open_for_install(cmd, $script_mode) do
case $cmdtype
when "bat"
- "#{<<EOH}#{shebang}#{body}#{<<EOF}".gsub(/$/, "\r")
-@echo off
-@if not "%~d0" == "~d0" goto WinNT
-#{ruby_bin} -x "#{cmd}" %1 %2 %3 %4 %5 %6 %7 %8 %9
-@goto endofruby
-:WinNT
-"%~dp0#{ruby_install_name}" -x "%~f0" %*
-@goto endofruby
-EOH
-__END__
-:endofruby
-EOF
+ [<<-"EOH".gsub(/^\s+/, ''), shebang, body, <<-"EOF".gsub(/^\s+/, '')].join.gsub(/$/, "\r")
+ @echo off
+ @if not "%~d0" == "~d0" goto WinNT
+ #{ruby_bin} -x "#{cmd}" %1 %2 %3 %4 %5 %6 %7 %8 %9
+ @goto endofruby
+ :WinNT
+ "%~dp0#{ruby_install_name}" -x "%~f0" %*
+ @goto endofruby
+ EOH
+ __END__
+ :endofruby
+ EOF
when "cmd"
"#{<<"/EOH"}#{shebang}#{body}"
@"%~dp0#{ruby_install_name}" -x "%~f0" %*