dotfiles

beau's configuration files
git clone https://git.beauhilton.com/dotfiles.git
Log | Files | Refs | README

texclear (505B)


      1 #!/usr/bin/env sh
      2 
      3 # Clears the build files of a LaTeX/XeLaTeX build.
      4 # I have vim run this file whenever I exit a .tex file.
      5 
      6 case "$1" in
      7 	*.tex)
      8 	file=$(readlink -f "$1")
      9 	dir=$(dirname "$file")
     10 	base="${file%.*}"
     11 	find "$dir"  -maxdepth 1 -type f -regextype gnu-awk -regex "^$base\\.(4tc|xref|tmp|pyc|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)" -delete ;;
     12 	*) printf "Give .tex file as argument.\\n" ;;
     13 esac
     14