From 656f095b6860191e0023e9f53ff041cc1a4e8135 Mon Sep 17 00:00:00 2001 From: AustrianToast Date: Tue, 25 Jun 2024 23:21:01 +0200 Subject: [PATCH] prevent future errors --- Rule34/gallery-dl.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Rule34/gallery-dl.sh b/Rule34/gallery-dl.sh index 1e9024d..8adcb56 100755 --- a/Rule34/gallery-dl.sh +++ b/Rule34/gallery-dl.sh @@ -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"