aboutsummaryrefslogtreecommitdiff
path: root/sbopkglint.d
diff options
context:
space:
mode:
Diffstat (limited to 'sbopkglint.d')
-rw-r--r--sbopkglint.d/10-docs.t.sh15
1 files changed, 12 insertions, 3 deletions
diff --git a/sbopkglint.d/10-docs.t.sh b/sbopkglint.d/10-docs.t.sh
index 26e0255..1e9e02a 100644
--- a/sbopkglint.d/10-docs.t.sh
+++ b/sbopkglint.d/10-docs.t.sh
@@ -27,12 +27,12 @@ if [ -d "$DOCDIR" ]; then
badpermfiles="$( find $DOCDIR -mindepth 1 -type f -a \! -perm -444 )"
badpermdirs="$( find $DOCDIR -mindepth 1 -type d -a \! -perm 0755 )"
badowners="$( find $DOCDIR -mindepth 1 -user root -a -group root -o -print )"
- empty="$( find $DOCDIR -mindepth 1 -empty )"
+ empty="$( find $DOCDIR -mindepth 1 -maxdepth 1 -empty )"
bogus="$( find $DOCDIR -mindepth 1 -maxdepth 1 -type f -a \( -name INSTALL -o -name INSTALL.\* \) )"
files="$( find $DOCDIR -type f -perm /111 )"
for f in $files; do
- head -1 $f | grep -q '^#!' && continue; # script file
+ head -1 $f | grep -q '^#!' && continue; # script file, +x is OK
badpermfiles+=" $f"
done
@@ -40,7 +40,16 @@ if [ -d "$DOCDIR" ]; then
[ -n "$badpermdirs" ] && warn "bad directory perms (should be 755) in doc dir:" && ls -ld $badpermdirs
[ -n "$badowners" ] && warn "bad ownership (should be root:root) in doc dir:" && ls -ld $badowners
[ -n "$empty" ] && warn "empty files/dirs in doc dir: $empty"
- [ -n "$bogus" ] && [ -z "$INSTALL_DOCS_OK" ] && warn "useless-looking install instructions in doc dir: $bogus"
+
+ if [ -z "$INSTALL_DOCS_OK" -a -n "$bogus" ]; then
+ for i in $bogus; do
+ if grep -q 'generic installation instructions' $i; then
+ warn "generic install instructions found, useless, please remove: $i"
+ else
+ note "install instructions found, is this relevant for binary package users?: $i"
+ fi
+ done
+ fi
fi
# allow /usr/doc/HTML to exist, though we don't check its contents here.