summaryrefslogtreecommitdiff
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
commit0313f4cee5312ac16fe5cd671e0014903fff2bad (patch)
tree3dd375450b4a25c68a68b538c29d87079ee3d4ff /instruby.rb
parent8e5870d2c471367648d99268e9ddb3177f710e20 (diff)
* 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/branches/ruby_1_8@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 3eb8fcea72..a9d66c7670 100644
--- a/instruby.rb
+++ b/instruby.rb
@@ -72,6 +72,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
@@ -155,11 +156,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__