From 4d4fea0f998f8cfcd3b9b22a64965b903f6c82de Mon Sep 17 00:00:00 2001 From: frederik Date: Sun, 24 Apr 2022 11:28:40 +0200 Subject: [PATCH] add permanent fix for midnight bug --- scripts/extract_new_birdsounds.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/extract_new_birdsounds.sh b/scripts/extract_new_birdsounds.sh index cee339a..754e218 100755 --- a/scripts/extract_new_birdsounds.sh +++ b/scripts/extract_new_birdsounds.sh @@ -27,12 +27,12 @@ for h in "${SCAN_DIRS[@]}";do # Field 5: Confidence # Removes old directories - #if echo "${h}" | grep $(date --date="yesterday" "+%A") &> /dev/null;then - # echo "Removing old directories" - # rm -drf "${h}" - # rm -drf "$(echo ${h} | cut -d'-' -f1-3)" - # continue - #fi + if echo "${h}" | grep $(date --date="-2 day" "+%A") &> /dev/null;then + echo "Removing old directories" + rm -drf "${h}" + rm -drf "$(echo ${h} | cut -d'-' -f1-3)" + continue + fi # Iterates over each "Analyzed" directory for i in $(find ${h} -name '*csv' 2>/dev/null | sort );do