Skip to content

Commit

Permalink
dist-docs: Fix text and HTML manpage generation with some groff versi…
Browse files Browse the repository at this point in the history
…ons.

Some versions of groff use termcap sequences for bold, italic, etc. by
default.  The dist-docs script doesn't cope with those; it expects
sequences based on backspacing and overprinting.  This commit fixes the
problem by setting an environment variable GROFF_NO_SGR that forces groff
to use backspacing.

Found on Fedora.

Reported-by: Russell Bryant <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
Acked-by: Russell Bryant <[email protected]>
  • Loading branch information
blp committed Nov 11, 2015
1 parent ef6d1b1 commit 0e7850e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build-aux/dist-docs
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ EOF
(cd $distdir
for manpage in $manpages; do
man -l -Tps $manpage | ps2pdf - > $manpage.pdf
man -l -Tutf8 $manpage | sed 's/.//g' > $manpage.txt
GROFF_NO_SGR=1 man -l -Tutf8 $manpage | sed 's/.//g' > $manpage.txt
(echo '<html><head><meta charset="UTF-8"></head><body><pre>'
man -l -Tutf8 $manpage | sed '
GROFF_NO_SGR=1 man -l -Tutf8 $manpage | sed '
s/&/&amp;/g
s/</&lt;/g
s/>/&gt;/g
Expand Down

0 comments on commit 0e7850e

Please sign in to comment.