-
-
Save AllanLRH/5699938 to your computer and use it in GitHub Desktop.
Bash script for cleaning up after a LaTeX run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
exts=".ind .out .sync .idx .ilg .fls .log .aux .fdb_latexmk .bbl .blg .brf .lof .lol .lot .nav .snm .tdo .thm .toc .synctex.gz .run.xml -blx.bib" | |
for x in "${@:-.}"; do | |
arg=$(echo ${x:-.} | perl -pe 's/\.(tex|pdf)$//') | |
if [[ -d "$arg" ]]; then | |
for ext in $exts; do | |
rm -f "$arg"/*$ext | |
done | |
else | |
for ext in $exts; do | |
rm -f "$arg"$ext | |
done | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment