* tool/rbinstall.rb: expand target file name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ee1cfc11e3
commit
5a4f004d74
@ -1,4 +1,6 @@
|
|||||||
Sat Apr 24 16:20:26 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sat Apr 24 16:27:16 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* tool/rbinstall.rb: expand target file name.
|
||||||
|
|
||||||
* template/fake.rb.in: no need for hook if extmk.
|
* template/fake.rb.in: no need for hook if extmk.
|
||||||
|
|
||||||
|
@ -407,7 +407,7 @@ install?(:local, :comm, :bin, :'bin-comm') do
|
|||||||
next unless File.file?(src)
|
next unless File.file?(src)
|
||||||
next if /\/[.#]|(\.(old|bak|orig|rej|diff|patch|core)|~|\/core)$/i =~ src
|
next if /\/[.#]|(\.(old|bak|orig|rej|diff|patch|core)|~|\/core)$/i =~ src
|
||||||
|
|
||||||
name = trans[File.basename(src)]
|
name = RbConfig.expand(trans[File.basename(src)])
|
||||||
|
|
||||||
shebang = ''
|
shebang = ''
|
||||||
body = ''
|
body = ''
|
||||||
@ -424,7 +424,7 @@ install?(:local, :comm, :bin, :'bin-comm') do
|
|||||||
open_for_install(cmd, $script_mode) do
|
open_for_install(cmd, $script_mode) do
|
||||||
case $cmdtype
|
case $cmdtype
|
||||||
when "bat"
|
when "bat"
|
||||||
[<<-"EOH".gsub(/^\s+/, ''), shebang, body, <<-"EOF".gsub(/^\s+/, '')].join.gsub(/$/, "\r")
|
[<<-"EOH".gsub(/^\s+/, ''), shebang, body, "__END__\n:endofruby\n"].join.gsub(/$/, "\r")
|
||||||
@echo off
|
@echo off
|
||||||
@if not "%~d0" == "~d0" goto WinNT
|
@if not "%~d0" == "~d0" goto WinNT
|
||||||
#{ruby_bin} -x "#{cmd}" %1 %2 %3 %4 %5 %6 %7 %8 %9
|
#{ruby_bin} -x "#{cmd}" %1 %2 %3 %4 %5 %6 %7 %8 %9
|
||||||
@ -433,11 +433,8 @@ install?(:local, :comm, :bin, :'bin-comm') do
|
|||||||
"%~dp0#{ruby_install_name}" -x "%~f0" %*
|
"%~dp0#{ruby_install_name}" -x "%~f0" %*
|
||||||
@goto endofruby
|
@goto endofruby
|
||||||
EOH
|
EOH
|
||||||
__END__
|
|
||||||
:endofruby
|
|
||||||
EOF
|
|
||||||
when "cmd"
|
when "cmd"
|
||||||
"#{<<"/EOH"}#{shebang}#{body}"
|
<<"/EOH" << shebang << body
|
||||||
@"%~dp0#{ruby_install_name}" -x "%~f0" %*
|
@"%~dp0#{ruby_install_name}" -x "%~f0" %*
|
||||||
@exit /b %ERRORLEVEL%
|
@exit /b %ERRORLEVEL%
|
||||||
/EOH
|
/EOH
|
||||||
|
Loading…
x
Reference in New Issue
Block a user