summaryrefslogtreecommitdiff
path: root/debian/clean.sh
blob: 39430604a01412874660897872bc9025ee27e29a (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/sh

# small script to cleanup the intermediate build results. The boxbackup
# upstream build environment seem to not include any mechanism to clean
# the build tree up.
#
# in order to avoid cluttering the package build scripts, this is
# factored out as a seperate, distribution agnostic cleanup script.

rm -fr aclocal.m4 configure
rm -fr contrib/*/bbackupd contrib/*/bbstored
rm -fr lib/common/BoxConfig.h.in test/bbackupd/testfiles/bbackupd.conf

# generated files for removal
rm -vf ExceptionCodes.txt infrastructure/BoxPlatform.pm
rm -vf lib/common/BoxConfig.h runtest.pl
rm -vf infrastructure/makebuildenv.pl
rm -vf infrastructure/makedistribution.pl
rm -vf infrastructure/makeparcels.pl
rm -vf lib/common/makeexception.pl
rm -vf lib/common/BoxPortsAndFiles.h
rm -vf lib/raidfile/raidfile-config
rm -vf lib/server/makeprotocol.pl
rm -vf test/backupstorefix/testfiles/testbackupstorefix.pl
rm -vf test/bbackupd/testfiles/extcheck1.pl
rm -vf test/bbackupd/testfiles/extcheck2.pl
rm -vf test/bbackupd/testfiles/notifyscript.pl
rm -vf test/bbackupd/testfiles/syncallowscript.pl
rm -vf bin/bbackupd/bbackupd-config
rm -vf bin/bbackupquery/makedocumentation.pl
rm -vf bin/bbstored/bbstored-certs
rm -vf bin/bbstored/bbstored-config
rm -vf contrib/solaris/bbackupd-manifest.xml
rm -vf contrib/solaris/bbackupd-smf-method
rm -vf contrib/solaris/bbstored-manifest.xml
rm -vf contrib/solaris/bbstored-smf-method
rm -vf documentation/ExceptionCodes.xml
rm -vf documentation/manpage.links
rm -vf documentation/manpage.refs

find . -name '*.o' | xargs --no-run-if-empty rm -v
find . -name '*.a' | xargs --no-run-if-empty rm -v
find . -name '*.mpi' | xargs --no-run-if-empty rm -v
find . -name 'autogen_*' | xargs --no-run-if-empty rm -v
find . -name '_*' | xargs --no-run-if-empty rm -v
find . -name 'test-*.log' | xargs --no-run-if-empty rm -v
find . -name '*.plist' | xargs --no-run-if-empty rm -v
find . -name '*.pdf' | xargs --no-run-if-empty rm -v

find bin contrib distribution lib test -name 'Makefile' \
  | xargs --no-run-if-empty rm -v

rm -vf Makefile

# the test scripts do strange things here
# (directories without write permissions)
[ ! -d debug ] || chmod -R +rw debug/
rm -vfr release/ debug/ local/ parcels/

# conf files not found upstream but autogenerated
rm -vf test/bbackupd/testfiles/bbackupd-exclude.conf
rm -vf test/bbackupd/testfiles/bbackupd-snapshot.conf
rm -vf test/bbackupd/testfiles/bbackupd-symlink.conf