Skip to content

Commit

Permalink
[bin] latex_rm: Even more extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelRobitaille committed Oct 10, 2022
1 parent 20166f7 commit e9e6f1a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bin/latex_rm
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

0 comments on commit e9e6f1a

Please sign in to comment.