From 2354749c2f36e419edeed7b78ec0f4ba99070111 Mon Sep 17 00:00:00 2001 From: GlassedSilver Date: Mon, 9 May 2022 07:10:15 +0200 Subject: [PATCH] 002-fix_dupes_per_archive fix script: small impr. --- backend/fix-scripts/002-fix_dupes_per_archive_file.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/fix-scripts/002-fix_dupes_per_archive_file.sh b/backend/fix-scripts/002-fix_dupes_per_archive_file.sh index aff230a..05b4b49 100644 --- a/backend/fix-scripts/002-fix_dupes_per_archive_file.sh +++ b/backend/fix-scripts/002-fix_dupes_per_archive_file.sh @@ -14,8 +14,8 @@ PATH_SUBSARCHIVE=/app/subscriptions/archives PATH_ONEOFFARCHIVE=/app/appdata/archives # Backup paths (substitute with your personal preference if you like) -PATH_SUBSARCHIVEBKP=$PATH_SUBSARCHIVE-$(date +%Y%m%d) -PATH_ONEOFFARCHIVEBKP=$PATH_ONEOFFARCHIVE-$(date +%Y%m%d) +PATH_SUBSARCHIVEBKP=$PATH_SUBSARCHIVE-BKP-$(date +%Y%m%d%H%M%S) +PATH_ONEOFFARCHIVEBKP=$PATH_ONEOFFARCHIVE-BKP-$(date +%Y%m%d%H%M%S) # Define Colors for TUI @@ -101,7 +101,7 @@ if echo "$answer" | grep -iq "^y" ;then done BEFORE=$(wc -l < $tmpfile) AFTER=$(wc -l < $file) - if [[ "$AFTER" < "$BEFORE" ]]; then + if [[ "$AFTER" -ne "$BEFORE" ]]; then printf "\b✔ Compacted down to ${AFTER} lines from ${BEFORE}: ${file}\n" else printf "\bℹ No action needed for file: ${file}\n"