aboutsummaryrefslogtreecommitdiff
path: root/sbopkglint.d/40-newconfig.t.sh
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-04-04 14:07:14 -0400
committerB. Watson <yalhcru@gmail.com>2022-04-04 14:07:14 -0400
commit533599f74e56dc42bdac215e2d152f9769b6b56e (patch)
tree9a8d349d138937a7c2880589ae16078b68f4009e /sbopkglint.d/40-newconfig.t.sh
downloadsbo-maintainer-tools-533599f74e56dc42bdac215e2d152f9769b6b56e.tar.gz
initial commit
Diffstat (limited to 'sbopkglint.d/40-newconfig.t.sh')
-rw-r--r--sbopkglint.d/40-newconfig.t.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/sbopkglint.d/40-newconfig.t.sh b/sbopkglint.d/40-newconfig.t.sh
new file mode 100644
index 0000000..ee0aec5
--- /dev/null
+++ b/sbopkglint.d/40-newconfig.t.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# sbopkglint test, must be sourced by sbopkglint (not run standalone).
+
+# PKG, PRGNAM, VERSION, ARCH are set by sbopkglint. also the current
+# directory is the root of the installed package tree.
+
+#######################################################################
+# check for .new config files. there shouldn't be any, because when
+# sbopkglint installed the package, it ran the doinst.sh, which
+# should have renamed them.
+
+NEWFILES=""
+for f in "$( find -type f -name \*.new )"; do
+ [ -z "$f" ] && continue
+ case "$f" in
+ ./usr/doc/*) continue ;;
+ esac
+ NEWFILES+="$f "
+done
+
+[ -n "$NEWFILES" ] && warn "doinst.sh doesn't handle .new config files:" && ls -l $NEWFILES