aboutsummaryrefslogtreecommitdiff
path: root/sbopkglint.d/70-tmp_path.t.sh
blob: 5041f09a6b17b3a4da768bb87d77a3132cbdc237 (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/package-* hardcoded in files. uses the environment
# TMP, defaults to /tmp/SBo. this means that if you set TMP when
# building the package, you have to set it to the same thing for this
# check to work properly. If you don't ever set it, it'll be fine.

found="$(find . -type f -print0 | xargs -0 fgrep -l "$TMP/package-")"
if [ -n "$found" ]; then
	warn "found files with TMP ($TMP/package-*) baked in:"
	echo "$found" 1>&2
fi