diff options
author | Duncan Roe <duncan_roe@optusnet.com.au> | 2021-09-17 18:45:19 +1000 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2021-09-20 13:35:19 +0200 |
commit | d899bd45b8cf7ffcb269856f519f7e49196f550e (patch) | |
tree | 9a8cda7645f15c821c3864053e44f1f8bcd8389e | |
parent | 628dd3f3b654227b6e07b9b4a9d4accba4d67007 (diff) | |
download | libnetfilter_queue-d899bd45b8cf7ffcb269856f519f7e49196f550e.tar.gz |
src: build: Stop build_man.sh from deleting short Detailed Descriptions
An empty Detailed Description is 3 lines long but a short (1-para) DD is also 3
lines. Check that the 3rd line really is empty.
Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au>
Signed-off-by: Florian Westphal <fw@strlen.de>
-rwxr-xr-x | doxygen/build_man.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/doxygen/build_man.sh b/doxygen/build_man.sh index 63e02dc..852c7b8 100755 --- a/doxygen/build_man.sh +++ b/doxygen/build_man.sh @@ -116,7 +116,11 @@ del_empty_det_desc(){ mygrep "^\\.SH \"Detailed Description" $target [ $linnum -ne 0 ] || return 0 [ $(($i - $linnum)) -eq 3 ] || return 0 - delete_lines $linnum $(($i -1)) + # A 1-line Detailed Description is also 3 lines long, + # but the 3rd line is not empty + i=$(($i -1)) + [ $(tail -n+$i $target | head -n1 | wc -c) -le 2 ] || return 0 + delete_lines $linnum $i } move_synopsis(){ |