summaryrefslogtreecommitdiff
path: root/dh_clean
blob: 6306adda1c9ba34be40a8206337f7ee582cd0046 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh -e
#
# Clean up $TMP and other tepmorary files generated by the 
# build process.

PATH=debian:$PATH:/usr/lib/debhelper
. dh_lib

for PACKAGE in $DH_DOPACKAGES; do
	TMP=`tmpdir $PACKAGE`
	EXT=`pkgext $PACKAGE`
	doit "rm -rf $TMP"
	doit "rm -f debian/${EXT}substvars"
done
doit "rm -f debian/*.debhelper $*"
if [ ! "$DH_K_FLAG" ]; then
	doit "rm -f debian/files*"
fi

# Remove other temp files.
# Use complex_doit so we can properly escape things.
complex_doit "find . \( -name '#*#' -o -name '*~' -o -name DEADJOE \
	-o -name '*.orig' -o -name '*.rej' -o -name '*.bak' \
	-o -name '.*.orig' -o -name '.*.rej' -o -name .SUMS \
	-o -name TAGS -o -name core \
	\) -exec rm -f {} \;"