1
0
Fork 0
mirror of https://github.com/SinTan1729/random.git synced 2024-12-26 05:08:36 -06:00

made POSIX compliant

This commit is contained in:
Sayantan Santra 2021-12-28 23:59:05 -06:00
parent 9f7f550b5e
commit 1e5d77c8a4

View file

@ -3,13 +3,16 @@
#!/bin/sh #!/bin/sh
for f in *.tex; do for f in *.tex; do
h=$(basename "$f" .tex) if [ -f "$f" ]; then
echo "Trashing files accompanying $h.tex..." h=$(basename "$f" .tex)
for g in "$h".*; do echo "Trashing files accompanying $h.tex..."
if [[ ${g: -4} != ".tex" && ${g: -4} != ".pdf" ]] ; then for g in "$h".*; do
echo "Trashing $g..." k=$( echo $g | sed 's/^.*\.//')
totrash "$g" if [ "$k" != "tex" ] && [ "$k" != "pdf" ] && [ "$k" != "bib" ] ; then
fi echo "Trashing $g..."
done totrash "$g"
fi
done
fi
done done
echo "Done!" echo "Done!"