From 99020590bf958d88fa4b779ee8f03a86a951a4a9 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 16 Jun 2023 21:23:32 -0400 Subject: sbopkglint: spaces in filenames WIP #4. --- sbopkglint.d/30-manpages.t.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'sbopkglint.d/30-manpages.t.sh') diff --git a/sbopkglint.d/30-manpages.t.sh b/sbopkglint.d/30-manpages.t.sh index 7ab56d4..7900003 100644 --- a/sbopkglint.d/30-manpages.t.sh +++ b/sbopkglint.d/30-manpages.t.sh @@ -89,9 +89,18 @@ 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.$$ + find usr/man -name "* *" -print0 | xargs -r0 ls -bld > .spaces.$$ + if [ -s .spaces.$$ ]; then + warn "/usr/man may not contain filenames with spaces:" + cat .spaces.$$ + fi + rm -f .spaces.$$ + + # anything with a space in it won't be found by these, but + # it was complained about already. + find usr/man -type f -a \! -name "* *" > .manpages.$$ + find usr/man -mindepth 1 -type d -a \! -name "* *" > .mandirs.$$ + find usr/man -type d -a -empty -a \! -name "* *" > .manemptydirs.$$ while read d; do [ "$( stat -c '%a %U %G' "$d" )" != "755 root root" ] && BADDIRPERMS+="$d " -- cgit v1.2.3