From 1254c8842fe4d958754270d148428f087e834417 Mon Sep 17 00:00:00 2001 From: tim Date: Tue, 5 Sep 2017 13:15:29 +0200 Subject: [PATCH] Minor fix. --- download_daily_shows.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/download_daily_shows.sh b/download_daily_shows.sh index e9fe851..b043cc4 100755 --- a/download_daily_shows.sh +++ b/download_daily_shows.sh @@ -84,7 +84,7 @@ function download_show { # Wait 10 minutes before trying again #sleep 600 - if [ -d "${DOWNLOAD_DIR}/${show}" ]; then + if [ -d "${TMP_DIR}/${show}/" ] && [ -n "$( ls -A "${TMP_DIR}/${show}/" )" ]; then mkdir -p "${DOWNLOAD_DIR}/${show}" cp -nr "${TMP_DIR}/${show}"/* "${DOWNLOAD_DIR}/${show}"/ cp "${TMP_DIR}/${show}.archive" "${DOWNLOAD_DIR}/${show}.archive"