diff options
author | Yigit Sever | 2021-10-08 00:05:34 +0300 |
---|---|---|
committer | Yigit Sever | 2021-10-08 00:05:34 +0300 |
commit | 75d6e605a64d2f862942afb57f1ff5668d60ae52 (patch) | |
tree | 8d9da281e33f1f58b5e5d063ec0de4e9a3777cb4 /.local/bin/texclear | |
parent | 0287e6b35edab6c2694a8c59f5a5195e0de13014 (diff) | |
download | dotfiles-75d6e605a64d2f862942afb57f1ff5668d60ae52.tar.gz dotfiles-75d6e605a64d2f862942afb57f1ff5668d60ae52.tar.bz2 dotfiles-75d6e605a64d2f862942afb57f1ff5668d60ae52.zip |
bin: track bunch of scripts
Diffstat (limited to '.local/bin/texclear')
-rwxr-xr-x | .local/bin/texclear | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.local/bin/texclear b/.local/bin/texclear new file mode 100755 index 0000000..f6a5062 --- /dev/null +++ b/.local/bin/texclear | |||
@@ -0,0 +1,14 @@ | |||
1 | #!/bin/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 | |||