-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bin] latex_rm: Even more extensions
- Loading branch information
1 parent
20166f7
commit e9e6f1a
Showing
1 changed file
with
4 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
#!/bin/bash | ||
|
||
for ext in ".aux" ".bbl" ".bcf" ".blg" ".fdb_latexmk" ".fls" ".log" ".out" ".run.xml"; do | ||
declare -a extensions=(".aux" ".bbl" ".bcf" ".blg" ".fdb_latexmk" ".fls" ".log" ".out" ".run.xml" ".glg" ".glg-abr" ".glo" ".glo-abr" ".gls" ".gls-abr" ".ist" ".lof" ".lot") | ||
|
||
for ext in "${extensions[@]}"; do | ||
echo "${1%.*}$ext" | ||
done | ||
|
||
read -p "Confirm deleting these files? [y/n] " -n 1 -r | ||
echo | ||
if [[ $REPLY =~ ^[Yy]$ ]]; then | ||
for ext in ".aux" ".bbl" ".bcf" ".blg" ".fdb_latexmk" ".fls" ".log" ".out" ".run.xml"; do | ||
for ext in "${extensions[@]}"; do | ||
rm "${1%.*}$ext" | ||
done | ||
fi |