summaryrefslogtreecommitdiffstats
path: root/instruby.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-25 12:16:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-25 12:16:30 +0000
commit033bf5e02523ee3386a305ae11afb8fbbd79f2a4 (patch)
tree4077671de8e6db90234298dad49fcc2f7036bc10 /instruby.rb
parent5ec2b72e6cf36b52c9febff244a8d7fad656499e (diff)
downloadruby-033bf5e02523ee3386a305ae11afb8fbbd79f2a4.tar.gz
ruby-033bf5e02523ee3386a305ae11afb8fbbd79f2a4.tar.xz
ruby-033bf5e02523ee3386a305ae11afb8fbbd79f2a4.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@5830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'instruby.rb')
-rw-r--r--instruby.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/instruby.rb b/instruby.rb
index e9f6f0aca..146bb2d4f 100644
--- a/instruby.rb
+++ b/instruby.rb
@@ -74,6 +74,7 @@ def makedirs(dirs)
end
def with_destdir(dir)
+ return dir if $destdir.empty?
dir = dir.sub(/\A\w:/, '') if File::PATH_SEPARATOR == ';'
$destdir + dir
end
@@ -157,11 +158,11 @@ for src in Dir["bin/*"]
open(with_destdir(batfile), "w") { |b|
b.print <<EOH, shebang, body, <<EOF
@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
goto endofruby
:WinNT
-#{ruby_bin_dosish} -x "#{batfile}" %*
+"%~dp0#{ruby_install_name}" -x "%~f0" %*
goto endofruby
EOH
__END__