Skip to content
Snippets Groups Projects
clean 1.05 KiB
Newer Older
  • Learn to ignore specific revisions
  • amnesia's avatar
    amnesia committed
    #!/bin/sh
    
    
    for dir in chroot/{dev/pts,proc,sys,var/lib/dpkg} ; do
    
    amnesia's avatar
    amnesia committed
       if mountpoint -q "$dir" ; then
          umount "$dir"
       fi
    done
    
    
    lb clean noauto ${@}
    
    amnesia's avatar
    amnesia committed
    
    # 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
    
    # files copied or created in the build stage
    
    rm -f config/chroot_local-includes/usr/share/tails/build/variables
    
    rm -rf config/chroot_local-includes/usr/share/doc/tails/website wiki/src/.ikiwiki
    
    find wiki/src -name *.pot -exec rm {} \;