mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2025-10-07 07:22:36 +02:00
[texclear] - minimize | streamline
This commit is contained in:
parent
7a96fb100c
commit
8d554f2238
@ -3,14 +3,7 @@
|
|||||||
# Clears the build files of a LaTeX/XeLaTeX build.
|
# Clears the build files of a LaTeX/XeLaTeX build.
|
||||||
# I have vim run this file whenever I exit a .tex file.
|
# I have vim run this file whenever I exit a .tex file.
|
||||||
|
|
||||||
case "$1" in
|
[ "${1##*.}" = "tex" ] && {
|
||||||
*.tex)
|
find "$(dirname "${1}")" -regex '.*\(_minted.*\|.*\.\(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\)\)' -delete
|
||||||
file=$(readlink -f "$1")
|
} || printf "Provide a .tex file.\n"
|
||||||
dir=$(dirname "$file")
|
|
||||||
base="${file%.*}"
|
|
||||||
find "$dir" -maxdepth 1 -type f -regextype gnu-awk -regex "^$base\\.(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)" -delete
|
|
||||||
rm -rdf "$dir/_minted-$(basename -- "$base")"
|
|
||||||
;;
|
|
||||||
*) printf "Give .tex file as argument.\\n" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user