mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-25 20:58:37 -06:00
made POSIX compliant
This commit is contained in:
parent
9f7f550b5e
commit
1e5d77c8a4
1 changed files with 11 additions and 8 deletions
|
@ -3,13 +3,16 @@
|
|||
#!/bin/sh
|
||||
|
||||
for f in *.tex; do
|
||||
h=$(basename "$f" .tex)
|
||||
echo "Trashing files accompanying $h.tex..."
|
||||
for g in "$h".*; do
|
||||
if [[ ${g: -4} != ".tex" && ${g: -4} != ".pdf" ]] ; then
|
||||
echo "Trashing $g..."
|
||||
totrash "$g"
|
||||
fi
|
||||
done
|
||||
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..."
|
||||
totrash "$g"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
echo "Done!"
|
||||
|
|
Loading…
Reference in a new issue