clean 1.05 KB
Newer Older
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
#!/bin/sh

set -e
set -u
set -x

for dir in chroot/{dev/pts,proc,sys,var/lib/dpkg} ; do
   if mountpoint -q "$dir" ; then
      umount "$dir"
   fi
done

lb clean noauto ${@}

# rm -f build-*.log

# Remove generated files
rm -f config/binary config/bootstrap config/chroot config/common config/source

# Remove empty directories in config tree
if ls config/*/ > /dev/null 2>&1 ; then
	rmdir --ignore-fail-on-non-empty config/*/
fi

# files copied or created in the config stage
rm -f config/chroot_local-includes/etc/amnesia/environment
rm -f config/chroot_local-includes/etc/amnesia/version
rm -f config/chroot_local-includes/usr/share/doc/amnesia/Changelog
for list in config/chroot_local-packageslists/*.list ; do
   if [ "$list" != 'config/chroot_local-packageslists/tails-common.list' ]; then
      rm -f "$list"
   fi
done

# files copied or created in the build stage
rm -f config/chroot_local-includes/usr/share/tails/build/variables

# static wiki
rm -rf config/chroot_local-includes/usr/share/doc/tails/website wiki/src/.ikiwiki
find wiki/src -name *.pot -exec rm {} \;