summaryrefslogtreecommitdiffstats
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
commit117aa1a98d161efedda949e4b3123142fd98c24e (patch)
treee9fd4b074ca2f74573890bd85f939c66efc13254 /instruby.rb
parentc0d928a991e77fc1c6888c3a06cad46abed6c0a1 (diff)
downloadruby-117aa1a98d161efedda949e4b3123142fd98c24e.tar.gz
ruby-117aa1a98d161efedda949e4b3123142fd98c24e.tar.xz
ruby-117aa1a98d161efedda949e4b3123142fd98c24e.zip
wrong fix.
git-svn-id: http://svn.ruby-lang.org/repos/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 c414ad1d6..7483f1e16 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)