summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-12 07:27:16 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-12 07:27:16 +0000
commite22f35ef2a671b17738929aa25372ea29d9a0a5a (patch)
treefa9baffbd33849e04a3ebc8f3af3586d933fcd4a /tool
parentf9749aa63cbc35012623b9f4a375ec80c59633e8 (diff)
rbinstall.rb: shell code as comments
* tool/rbinstall.rb (PROLOG_SCRIPT): wrap shell code by =begin/=end as comments. [ruby-core:83202] [Bug#13997] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rwxr-xr-xtool/rbinstall.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index 2f060f42a8..93aed570b7 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -429,6 +429,7 @@ end
if load_relative or /\s/ =~ bindir
PROLOG_SCRIPT = <<EOS
#!/bin/sh\n# -*- ruby -*-
+_=_\\\n=begin
bindir="#{load_relative ? '${0%/*}' : bindir.gsub(/\"/, '\\\\"')}"
EOS
if CONFIG["LIBRUBY_RELATIVE"] != 'yes' and libpathenv = CONFIG["LIBPATHENV"]
@@ -438,7 +439,7 @@ libdir="#{load_relative ? '${bindir%/bin}/lib' : libdir.gsub(/\"/, '\\\\"')}"
export #{libpathenv}="$libdir${#{libpathenv}:+#{pathsep}$#{libpathenv}}"
EOS
end
- PROLOG_SCRIPT << %Q[exec "$bindir/#{ruby_install_name}" -x "$0" "$@"\n]
+ PROLOG_SCRIPT << %Q[exec "$bindir/#{ruby_install_name}" "-x" "$0" "$@"\n=end\n]
else
PROLOG_SCRIPT = nil
end