aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-06-16 21:23:32 -0400
committerB. Watson <urchlay@slackware.uk>2023-06-16 21:23:32 -0400
commit99020590bf958d88fa4b779ee8f03a86a951a4a9 (patch)
treeca7b285942af35f8d74f1f3832ba9e3ae5a81434
parentf04e33a32b883c688cfee61e57262384fc8d5a87 (diff)
downloadsbo-maintainer-tools-99020590bf958d88fa4b779ee8f03a86a951a4a9.tar.gz
sbopkglint: spaces in filenames WIP #4.
-rw-r--r--sbopkglint.d/30-manpages.t.sh15
1 files changed, 12 insertions, 3 deletions
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 "