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"