mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
man(1) needs to check for .so files not only in the first line
PR: 279182 Some manual pages have a copyright notice or commit id before including other files with the .so macro. We need to skip comments and empty lines at the beginning of the manpage while checking for the first .so macro. MFC after: 1 week
This commit is contained in:
parent
cadd2ca217
commit
73eb53813f
|
@ -322,7 +322,7 @@ man_check_for_so() {
|
||||||
# We need to loop to accommodate multiple .so directives.
|
# We need to loop to accommodate multiple .so directives.
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
line=$($cattool "$manpage" 2>/dev/null | head -n1)
|
line=$($cattool "$manpage" 2>/dev/null | grep -E -m1 -v '^\.\\"[ ]*|^[ ]*$')
|
||||||
case "$line" in
|
case "$line" in
|
||||||
.so*) trim "${line#.so}"
|
.so*) trim "${line#.so}"
|
||||||
decho "$manpage includes $tstr"
|
decho "$manpage includes $tstr"
|
||||||
|
|
Loading…
Reference in a new issue