Skip to content

Commit

Permalink
man(1) needs to check for .so files not only in the first line
Browse files Browse the repository at this point in the history
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
  • Loading branch information
wosch committed May 26, 2024
1 parent cadd2ca commit 73eb538
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion usr.bin/man/man.sh
Expand Up @@ -322,7 +322,7 @@ man_check_for_so() {
# We need to loop to accommodate multiple .so directives.
while true
do
line=$($cattool "$manpage" 2>/dev/null | head -n1)
line=$($cattool "$manpage" 2>/dev/null | grep -E -m1 -v '^\.\\"[ ]*|^[ ]*$')
case "$line" in
.so*) trim "${line#.so}"
decho "$manpage includes $tstr"
Expand Down

0 comments on commit 73eb538

Please sign in to comment.