Skip to content

Commit

Permalink
rbinstall.rb: shell code as comments
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nobu committed Oct 12, 2017
1 parent f9749aa commit e22f35e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tool/rbinstall.rb
Expand Up @@ -429,6 +429,7 @@ def CONFIG.[](name, mandatory = false)
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"]
Expand All @@ -438,7 +439,7 @@ def CONFIG.[](name, mandatory = false)
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
Expand Down

0 comments on commit e22f35e

Please sign in to comment.