aboutsummaryrefslogtreecommitdiff
path: root/sbopkglint.d/70-tmp_path.t.sh
blob: 4bf9218379fa56daf0b027e03c1e8422785895e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/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.
# also don't check kernel modules (they include the full path to the source,
# for debug messages).

found="$(find . -type f | grep -v '^\./usr/doc/.*\.SlackBuild$' | grep -v '^\./lib/modules/' | xargs fgrep -l "$TMP")"
if [ -n "$found" ]; then
	warn "found files with TMP ($TMP) baked in:"
	echo "$found" 1>&2
fi