texclean (478B)
1 #!/bin/sh 2 3 # cleanup tex output clutter 4 5 case "$1" in 6 *.tex) 7 f=$(readlink -f "$1") 8 d=$(dirname "$f") 9 b="${f%.*}" 10 junk=$(find "$d" -type f | grep -E -e ".*\\.log" -e "^$b\\.(4tc|xref|tmp|pyc|pyg|pyo|fls|vrb|fdb_latexmk|bak|swp|aux|log|synctex\\(busy\\)|lof|lot|maf|idx|mtc|mtc0|nav|out|snm|toc|bcf|run\\.xml|synctex\\.gz|blg|bbl)") 11 more=$(find "$d" -type d | grep "_min*") 12 [ -n "$junk" ] && rm $junk 13 [ -n "$more" ] && rm -r $more 14 ;; 15 *) echo "usage: $0: file.tex" ;; 16 esac