prevent future errors

This commit is contained in:
2024-06-25 23:21:01 +02:00
parent cd46d4cfd2
commit 656f095b68

View File

@ -1,5 +1,6 @@
#!/usr/bin/bash
[[ -f downloaded_r34.txt ]] || echo "no file to download from" || exit 1
cp downloaded_r34.txt to_download_r34.txt
while [ 1 ]
@ -9,6 +10,7 @@ do
if [ ! -s to_download_r34.txt ]; then
#success! just exit
echo "file empty"
rm to_download_r34.txt
exit 0
fi
echo "file not empty"