Install non-mdoc files as-is
See if the content contains `.Nm` macro, instead of the names. This reverts "Don't convert bundler man pages from mdoc to man", commit e0b40ef5d8173aff304c81f93516e1246e3c042c.
This commit is contained in:
parent
5318a48e4e
commit
bff168f182
Notes:
git
2025-02-01 07:56:45 +00:00
@ -850,6 +850,10 @@ def install_default_gem(dir, srcdir, bindir)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def mdoc_file?(mdoc)
|
||||||
|
/^\.Nm / =~ File.read(mdoc, 1024)
|
||||||
|
end
|
||||||
|
|
||||||
# :startdoc:
|
# :startdoc:
|
||||||
|
|
||||||
install?(:local, :arch, :bin, :'bin-arch') do
|
install?(:local, :arch, :bin, :'bin-arch') do
|
||||||
@ -1018,7 +1022,7 @@ install?(:local, :comm, :man) do
|
|||||||
destname = ruby_install_name.sub(/ruby/, base.chomp(".#{section}"))
|
destname = ruby_install_name.sub(/ruby/, base.chomp(".#{section}"))
|
||||||
destfile = File.join(destdir, "#{destname}.#{section}")
|
destfile = File.join(destdir, "#{destname}.#{section}")
|
||||||
|
|
||||||
if /\Adoc\b/ =~ mantype
|
if /\Adoc\b/ =~ mantype or !mdoc_file?(mdoc)
|
||||||
if compress
|
if compress
|
||||||
begin
|
begin
|
||||||
w = IO.popen(compress, "rb", in: mdoc, &:read)
|
w = IO.popen(compress, "rb", in: mdoc, &:read)
|
||||||
@ -1036,13 +1040,8 @@ install?(:local, :comm, :man) do
|
|||||||
class << (w = [])
|
class << (w = [])
|
||||||
alias print push
|
alias print push
|
||||||
end
|
end
|
||||||
if File.basename(mdoc).start_with?('bundle') ||
|
File.open(mdoc) {|r| Mdoc2Man.mdoc2man(r, w)}
|
||||||
File.basename(mdoc).start_with?('gemfile')
|
w = w.join("")
|
||||||
w = File.read(mdoc)
|
|
||||||
else
|
|
||||||
File.open(mdoc) {|r| Mdoc2Man.mdoc2man(r, w)}
|
|
||||||
w = w.join("")
|
|
||||||
end
|
|
||||||
if compress
|
if compress
|
||||||
begin
|
begin
|
||||||
w = IO.popen(compress, "r+b") do |f|
|
w = IO.popen(compress, "r+b") do |f|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user