зеркало из https://github.com/github/ruby.git
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:
Родитель
e3590ddb86
Коммит
c929094b31
|
@ -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]
|
||||
|
|
Загрузка…
Ссылка в новой задаче