From a67fb192694ccf8e57f37b1245b873ba7c579e5a Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Sun, 15 Aug 2021 15:50:32 +0200 Subject: [PATCH] keep most recent version, not oldest (less redownloading) --- threadwatcher | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/threadwatcher b/threadwatcher index 1076d3f..105e531 100755 --- a/threadwatcher +++ b/threadwatcher @@ -207,7 +207,7 @@ dedupe(){ fi echo "$dirs" | while read -r dir; do echo "Generating checksums for $dir ..." - duplicates="$( sha512sum "$dir"/* | sort | awk 'seen[$1]++' )" + duplicates="$( sha512sum "$dir"/* | sort -r | awk 'seen[$1]++' )" if [ -n "$duplicates" ]; then echo "Deleting duplicates..." echo "$duplicates" | cut -d' ' -f1,2 --complement |