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"