aboutsummaryrefslogtreecommitdiff
path: root/sbopkglint.d/70-tmp_path.t.sh
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-05-30 12:26:09 -0400
committerB. Watson <urchlay@slackware.uk>2023-05-30 12:26:09 -0400
commitb76a6efb4668d3fa60905a575d75ade4dcfabb85 (patch)
treed55fe87f39b6c7782c019595a5f51370db0a3379 /sbopkglint.d/70-tmp_path.t.sh
parentb32fed5e41ba86761853342b88b12121f64bfe0a (diff)
downloadsbo-maintainer-tools-b76a6efb4668d3fa60905a575d75ade4dcfabb85.tar.gz
sbolint: add douninst.sh checks; sbopkglint: add hardcoded $TMP check.
Diffstat (limited to 'sbopkglint.d/70-tmp_path.t.sh')
-rw-r--r--sbopkglint.d/70-tmp_path.t.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/sbopkglint.d/70-tmp_path.t.sh b/sbopkglint.d/70-tmp_path.t.sh
new file mode 100644
index 0000000..9d1f090
--- /dev/null
+++ b/sbopkglint.d/70-tmp_path.t.sh
@@ -0,0 +1,16 @@
+#!/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.
+
+#######################################################################
+# checks for /tmp/SBo (or the environment TMP) hardcoded in files.
+# don't check the SlackBuild in the doc dir, since it's guaranteed to match.
+
+found="$(find . -type f | grep -v '^\./usr/doc/.*\.SlackBuild$' | xargs fgrep -l "$TMP")"
+if [ -n "$found" ]; then
+ warn "found files with TMP ($TMP) baked in:"
+ echo "$found" 1>&2
+fi