diff options
author | B. Watson <urchlay@slackware.uk> | 2023-09-16 16:48:04 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2023-09-16 16:48:04 -0400 |
commit | a69bdc0ef63343373773995f7e87d11a29ed4259 (patch) | |
tree | f5974b6a55412a6729195e87879b0c3d46ade24f /sbopkglint.d/30-manpages.t.sh | |
parent | 23fac95b672fe55feb248e8101bc3fb63c3b0970 (diff) | |
download | sbo-maintainer-tools-a69bdc0ef63343373773995f7e87d11a29ed4259.tar.gz |
sbopkglint: refactor gzip detection.
Diffstat (limited to 'sbopkglint.d/30-manpages.t.sh')
-rw-r--r-- | sbopkglint.d/30-manpages.t.sh | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sbopkglint.d/30-manpages.t.sh b/sbopkglint.d/30-manpages.t.sh index 4264d86..0bc4a96 100644 --- a/sbopkglint.d/30-manpages.t.sh +++ b/sbopkglint.d/30-manpages.t.sh @@ -35,9 +35,7 @@ check_gzipped_page() { BADPERMS+="$f " fi - if [ "$( file -L -b --mime-type "$f" )" != "application/gzip" ]; then - NOTGZIPPED+="$f " - fi + is_gzipped "$f" || NOTGZIPPED+="$f " # I have ~42,000 man pages on my dev box, file(1) fails to identify # 12 of them as troff, but adding the check for .T catches them all. @@ -134,7 +132,7 @@ if [ -d usr/man ]; then [ -n "$BADDIRPERMS" ] && warn "bad man directory owner/permissions (should be 0755, root:root)" && ls -ld $BADDIRPERMS [ -n "$BADDIRS" ] && warn "bad directory names in /usr/man:" && ls -ld $BADDIRS [ -n "$BADNAMES" ] && warn "bad man page names (not *.gz):" && ls -ld $BADNAMES - [ -n "$NOTGZIPPED" ] && warn "non-gzip (but named *.gz) man pages:" && ls -ld $NOTGZIPPED + [ -n "$NOTGZIPPED" ] && warn "non-gzipiped (but named *.gz) man pages:" && ls -ld $NOTGZIPPED [ -n "$NONTROFF" ] && warn "invalid man pages (not troff):" && ls -ld $NONTROFF [ -n "$WRONGSECT" ] && warn "man pages in wrong section:" && ls -ld $WRONGSECT fi |