build_documentation: postprocess regular expression uses command name

The previous regular expression only matched the `abbr` text and was
used in testing.
This commit is contained in:
David Adam 2017-12-15 09:53:15 +08:00
parent 69342066f4
commit 834f344f1d

View file

@ -135,9 +135,9 @@ if test "$RESULT" = 0 ; then
CMD_NAME=`basename "$i" .txt`;
sed -E < ${CMD_NAME}.1 > ${CMD_NAME}.1.tmp \
-e "/^.SH NAME/{
N; N
s/abbr \\\\- \n.SH \"abbr (- .*)\"/\\\fBabbr\\\fP \1/g
}"
N; N
s/${CMD_NAME} \\\\- \n.SH \"${CMD_NAME} (- .*)\"/\\\fB${CMD_NAME}\\\fP \1/g
}"
mv "${CMD_NAME}.1.tmp" "${CMD_NAME}.1"
done