mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
rbinstall.rb: prefix with space [ci skip]
* tool/rbinstall.rb (bin): exec via /bin/sh if the prefix contains space charaters, because shebang does not support that case in general. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e3590ddb86
commit
c929094b31
1 changed files with 4 additions and 4 deletions
|
@ -418,16 +418,16 @@ install?(:doc, :capi) do
|
|||
install_recursive "doc/capi", docdir+"/capi", :mode => $data_mode
|
||||
end
|
||||
|
||||
if load_relative
|
||||
if load_relative or /\s/ =~ bindir
|
||||
PROLOG_SCRIPT = <<EOS
|
||||
#!/bin/sh\n# -*- ruby -*-
|
||||
bindir="${0%/*}"
|
||||
bindir="#{load_relative ? '${0%/*}' : bindir.gsub(/\"/, '\\\\"')}"
|
||||
EOS
|
||||
if CONFIG["LIBRUBY_RELATIVE"] != 'yes' and libpathenv = CONFIG["LIBPATHENV"]
|
||||
pathsep = File::PATH_SEPARATOR
|
||||
PROLOG_SCRIPT << <<EOS
|
||||
prefix="${bindir%/bin}"
|
||||
export #{libpathenv}="$prefix/lib${#{libpathenv}:+#{pathsep}$#{libpathenv}}"
|
||||
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]
|
||||
|
|
Loading…
Reference in a new issue