mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-25 20:58:37 -06:00
fix: Error when nothing is entered
This commit is contained in:
parent
b96561e6a4
commit
10bb17709e
1 changed files with 3 additions and 3 deletions
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
if [ "$1" = "--delete" ]; then
|
if [ "$1" = "--delete" ]; then
|
||||||
read -p "Warning: Deleting instead of trashing. Continue? [y/N]: " resp
|
read -p "Warning: Deleting instead of trashing. Continue? [y/N]: " resp
|
||||||
if [ $resp != "y" ] && [ $resp != "Y" ]; then
|
if [ "$resp" != "y" ] && [ "$resp" != "Y" ]; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
d=1
|
d=1
|
||||||
|
@ -21,8 +21,8 @@ for f in *.tex; do
|
||||||
h=$(basename "$f" .tex)
|
h=$(basename "$f" .tex)
|
||||||
echo "Removing files accompanying $h.tex..."
|
echo "Removing files accompanying $h.tex..."
|
||||||
for g in "$h".*; do
|
for g in "$h".*; do
|
||||||
k=$( echo $g | sed 's/^.*\.//')
|
k=$(echo $g | sed 's/^.*\.//')
|
||||||
if [ "$k" != "tex" ] && [ "$k" != "pdf" ] && [ "$k" != "bib" ] ; then
|
if [ "$k" != "tex" ] && [ "$k" != "pdf" ] && [ "$k" != "bib" ]; then
|
||||||
echo "Removing $g..."
|
echo "Removing $g..."
|
||||||
[ $d -eq 0 ] && trash "$g" || rm "$g"
|
[ $d -eq 0 ] && trash "$g" || rm "$g"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue