clean 1.18 KB
Newer Older
amnesia's avatar
amnesia committed
1
2
#!/bin/sh

3
for dir in chroot/{dev/pts,proc,sys,var/lib/dpkg} ; do
amnesia's avatar
amnesia committed
4
5
6
7
8
   if mountpoint -q "$dir" ; then
      umount "$dir"
   fi
done

9
lb clean noauto ${@}
amnesia's avatar
amnesia committed
10
11
12
13
14
15
16
17
18
19

# 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
20

21
# files copied or created in the config stage
22
rm -f config/chroot_local-includes/etc/amnesia/environment
23
rm -f config/chroot_local-includes/etc/amnesia/version
24
25
rm -f config/chroot_local-includes/usr/share/doc/amnesia/Changelog
rm -f config/chroot_local-includes/usr/share/doc/amnesia/amnesia.asc
26
for list in config/chroot_local-packageslists/*.list ; do
27
   if [ "$list" != 'config/chroot_local-packageslists/tails-common.list' ]; then
28
29
30
      rm -f "$list"
   fi
done
amnesia's avatar
amnesia committed
31
rm -f config/chroot_local-includes/home/amnesia/.gnome2/nautilus-scripts/*
32

33
34
35
# files copied or created in the build stage
rm -f config/chroot_local-includes/usr/share/amnesia/build/variables

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