From 65a498f2f765016d42f5309dbabc599cfc324010 Mon Sep 17 00:00:00 2001 From: tastytea Date: Mon, 22 Jul 2019 15:02:42 +0200 Subject: [PATCH] fetch_gaidao.sh: Do not try to download nothingness. --- fetch_gaidao.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fetch_gaidao.sh b/fetch_gaidao.sh index a61ba71..f767c7f 100755 --- a/fetch_gaidao.sh +++ b/fetch_gaidao.sh @@ -9,7 +9,7 @@ for ausgabe in ${ausgaben}; do url=$(curl -s "${ausgabe}" \ | grep -Eo 'https://fda-ifa.org/wp-content/uploads/[0-9]{4}/[0-9]{2}/[^ ]*\.epub') file=$(echo "${url}" | grep -o '[^/]*\.epub') - if [ ! -e "${file}" ]; then + if [ -n "${file}" ] && [ ! -e "${file}" ]; then echo "Downloading Gai Dao: ${file}." curl -so "${file}" "${url}" fi