aboutsummaryrefslogtreecommitdiff
path: root/sbopkglint.d/30-manpages.t.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sbopkglint.d/30-manpages.t.sh')
-rw-r--r--sbopkglint.d/30-manpages.t.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/sbopkglint.d/30-manpages.t.sh b/sbopkglint.d/30-manpages.t.sh
index 30c3841..7ab56d4 100644
--- a/sbopkglint.d/30-manpages.t.sh
+++ b/sbopkglint.d/30-manpages.t.sh
@@ -91,6 +91,7 @@ check_locale_dir() {
if [ -d usr/man ]; then
find usr/man -type f > .manpages.$$
find usr/man -mindepth 1 -type d > .mandirs.$$
+ find usr/man -type d -a -empty > .manemptydirs.$$
while read d; do
[ "$( stat -c '%a %U %G' "$d" )" != "755 root root" ] && BADDIRPERMS+="$d "
@@ -113,7 +114,12 @@ if [ -d usr/man ]; then
esac
done < .manpages.$$
- rm -f .manpages.$$ .mandirs.$$
+ if [ -s .manemptydirs.$$ ]; then
+ warn "empty dir(s) in /usr/man:"
+ cat .manemptydirs.$$
+ fi
+
+ rm -f .manpages.$$ .mandirs.$$ manemptydirs.$$
[ -n "$BADPERMS" ] && warn "bad man page owner/permissions (should be 0644, root:root)" && ls -ld $BADPERMS
[ -n "$BADDIRPERMS" ] && warn "bad man directory owner/permissions (should be 0755, root:root)" && ls -ld $BADDIRPERMS