summaryrefslogtreecommitdiff
path: root/instruby.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-22 21:42:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-22 21:42:25 +0000
commitf4f0be3a12c4fdba190df790c55805142cf71d1b (patch)
treee9fd4b074ca2f74573890bd85f939c66efc13254 /instruby.rb
parent0505b3889c42697d82de3d9b4565b91a55878de6 (diff)
wrong fix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3396 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 c414ad1..7483f1e 100644
--- a/instruby.rb
+++ b/instruby.rb
@@ -51,7 +51,7 @@ arc = CONFIG["LIBRUBY_A"]
makedirs [bindir, libdir, rubylibdir, archlibdir, sitelibdir, sitearchlibdir]
-ruby_bin = File.join(CONFIG["bindir"], ruby_install_name)
+ruby_bin = File.join(bindir, ruby_install_name)
install ruby_install_name+exeext, ruby_bin+exeext, 0755
if rubyw_install_name and !rubyw_install_name.empty?
@@ -76,6 +76,7 @@ end
Dir.chdir CONFIG["srcdir"]
+ruby_shebang = File.join(CONFIG["bindir"], ruby_install_name)
for src in Dir["bin/*"]
next unless File.file?(src)
next if /\/[.#]|(\.(old|bak|orig|rej|diff|patch|core)|~|\/core)$/i =~ src
@@ -93,7 +94,7 @@ for src in Dir["bin/*"]
shebang = f.gets
body = f.read
- if shebang.sub!(/^\#!.*?ruby\b/) {"#!" + ruby_bin}
+ if shebang.sub!(/^\#!.*?ruby\b/) {"#!" + ruby_shebang}
f.rewind
f.print shebang, body
f.truncate(f.pos)