-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrecursive_clean_latex_secondary_files.sh
41 lines (39 loc) · 1.22 KB
/
recursive_clean_latex_secondary_files.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
current="$(pwd)"
if [[ $1 ]];then
if [[ -d "$1" ]] ; then
cd "$(readlink "$1")"
else
if [ -f "$1" ]; then
cd "$(dirname "$(readlink "$1")")"
else
echo "Arg must be a directory"
fi
fi
fi
find . -name '*.blg' -type f -delete
find . -name '*.bbl' -type f -delete
find . -name '*.aux' -type f -delete
find . -name '*.log' -type f -delete
find . -name '*.thm' -type f -delete
find . -name '*.out' -type f -delete
find . -name '*.spl' -type f -delete
find . -name '*.gz' -type f -delete
find . -name '*.toc' -type f -delete
find . -name '*.lof' -type f -delete
find . -name '*.lot' -type f -delete
find . -name '*.run.xml' -type f -delete
find . -name '*-blx.bib' -type f -delete
find . -name '*.maf' -type f -delete
find . -name '*.mtc' -type f -delete
find . -name '*.mtc0' -type f -delete
find . -name '*.mtc1' -type f -delete
find . -name '*.mtc2' -type f -delete
find . -name '*.mtc3' -type f -delete
find . -name '*.mtc4' -type f -delete
find . -name '*.mtc5' -type f -delete
find . -name '*.mtc6' -type f -delete
find . -name '*.mtc7' -type f -delete
find . -name '*.mtc8' -type f -delete
find . -name '*.mtc9' -type f -delete
find . -name '*.bcf' -type f -delete