clean 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/sh
  2. set -x
  3. for dir in chroot/{dev/pts,proc,sys,var/lib/dpkg} ; do
  4. if mountpoint -q "$dir" ; then
  5. umount "$dir"
  6. fi
  7. done
  8. lb clean noauto ${@}
  9. # rm -f build-*.log
  10. # Remove generated files
  11. rm -f config/binary config/bootstrap config/chroot config/common config/source
  12. # Remove empty directories in config tree
  13. if ls config/*/ > /dev/null 2>&1 ; then
  14. rmdir --ignore-fail-on-non-empty config/*/
  15. fi
  16. # files copied or created in the config stage
  17. rm -f config/chroot_local-includes/etc/amnesia/environment
  18. rm -f config/chroot_local-includes/etc/amnesia/version
  19. rm -f config/chroot_local-includes/usr/share/doc/amnesia/Changelog
  20. for list in config/chroot_local-packageslists/*.list ; do
  21. if [ "$list" != 'config/chroot_local-packageslists/tails-common.list' ]; then
  22. rm -f "$list"
  23. fi
  24. done
  25. # files copied or created in the build stage
  26. rm -f config/chroot_local-includes/usr/share/amnesia/build/variables
  27. # static wiki
  28. rm -rf config/chroot_local-includes/usr/share/doc/tails/website wiki/src/.ikiwiki
  29. find wiki/src -name *.pot -exec rm {} \;