mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* instruby.rb (with_destdir): should return the given argument if no
DESTDIR is given. * instruby.rb: use path name expansion of cmd.exe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8f2057e33d
commit
61deeb3741
2 changed files with 10 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
Wed Feb 25 21:16:10 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* instruby.rb (with_destdir): should return the given argument if no
|
||||||
|
DESTDIR is given.
|
||||||
|
|
||||||
|
* instruby.rb: use path name expansion of cmd.exe.
|
||||||
|
|
||||||
Wed Feb 25 20:44:45 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Feb 25 20:44:45 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* lib/cgi-lib.rb, lib/getopts.rb, lib/importenv.rb, lib/parsearg.rb:
|
* lib/cgi-lib.rb, lib/getopts.rb, lib/importenv.rb, lib/parsearg.rb:
|
||||||
|
|
|
@ -74,6 +74,7 @@ def makedirs(dirs)
|
||||||
end
|
end
|
||||||
|
|
||||||
def with_destdir(dir)
|
def with_destdir(dir)
|
||||||
|
return dir if $destdir.empty?
|
||||||
dir = dir.sub(/\A\w:/, '') if File::PATH_SEPARATOR == ';'
|
dir = dir.sub(/\A\w:/, '') if File::PATH_SEPARATOR == ';'
|
||||||
$destdir + dir
|
$destdir + dir
|
||||||
end
|
end
|
||||||
|
@ -157,11 +158,11 @@ for src in Dir["bin/*"]
|
||||||
open(with_destdir(batfile), "w") { |b|
|
open(with_destdir(batfile), "w") { |b|
|
||||||
b.print <<EOH, shebang, body, <<EOF
|
b.print <<EOH, shebang, body, <<EOF
|
||||||
@echo off
|
@echo off
|
||||||
if "%OS%" == "Windows_NT" goto WinNT
|
if not "%~d0" == "~d0" goto WinNT
|
||||||
#{ruby_bin_dosish} -x "#{batfile}" %1 %2 %3 %4 %5 %6 %7 %8 %9
|
#{ruby_bin_dosish} -x "#{batfile}" %1 %2 %3 %4 %5 %6 %7 %8 %9
|
||||||
goto endofruby
|
goto endofruby
|
||||||
:WinNT
|
:WinNT
|
||||||
#{ruby_bin_dosish} -x "#{batfile}" %*
|
"%~dp0#{ruby_install_name}" -x "%~f0" %*
|
||||||
goto endofruby
|
goto endofruby
|
||||||
EOH
|
EOH
|
||||||
__END__
|
__END__
|
||||||
|
|
Loading…
Reference in a new issue