mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-25 20:58:37 -06:00
20 lines
528 B
Text
20 lines
528 B
Text
# I use it to clean up latex build files from a directory after I'm done with the project.
|
|
|
|
#!/bin/sh
|
|
|
|
# Depends on trash-cli
|
|
|
|
for f in *.tex; do
|
|
if [ -f "$f" ]; then
|
|
h=$(basename "$f" .tex)
|
|
echo "Trashing files accompanying $h.tex..."
|
|
for g in "$h".*; do
|
|
k=$( echo $g | sed 's/^.*\.//')
|
|
if [ "$k" != "tex" ] && [ "$k" != "pdf" ] && [ "$k" != "bib" ] ; then
|
|
echo "Trashing $g..."
|
|
trash "$g"
|
|
fi
|
|
done
|
|
fi
|
|
done
|
|
echo "Done!"
|