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:
parent
9f7f550b5e
commit
1e5d77c8a4
1 changed files with 11 additions and 8 deletions
|
@ -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!"
|
||||||
|
|
Loading…
Reference in a new issue