fix error response code
[tails.git] / auto / clean
blob979d43448f2c95e82f7f6788dd13658e9ede558d
1 #!/bin/sh
3 set -e
4 set -u
5 set -x
7 for dir in dev/pts proc sys var/lib/dpkg ; do
8 if mountpoint -q "chroot/$dir" ; then
9 umount "chroot/$dir"
11 done
13 lb clean noauto "${@}"
15 # rm -f build-*.log
17 # Remove generated files
18 rm -f config/binary config/bootstrap config/chroot config/common config/source
20 # Remove empty directories in config tree
21 if ls config/*/ > /dev/null 2>&1 ; then
22 rmdir --ignore-fail-on-non-empty config/*/
25 # files copied or created in the config stage
26 rm -f config/chroot_local-includes/etc/tails/environment
27 rm -f config/chroot_local-includes/etc/amnesia/version
28 rm -f config/chroot_local-includes/usr/share/doc/tails/Changelog
29 for list in config/chroot_local-packageslists/*.list ; do
30 if [ "$list" != 'config/chroot_local-packageslists/tails-common.list' ]; then
31 rm -f "$list"
33 done
35 # files copied or created in the build stage
36 rm -f config/chroot_local-includes/usr/share/tails/build/variables
38 # static wiki
39 rm -rf config/chroot_local-includes/usr/share/doc/tails/website wiki/src/.ikiwiki
40 find wiki/src -name '*.pot' -exec rm {} \;
42 # workarounds
43 rm -rf config/chroot_local-includes/tmp/tails-workarounds