keep most recent version, not oldest (less redownloading)
This commit is contained in:
parent
06befea402
commit
a67fb19269
@ -207,7 +207,7 @@ dedupe(){
|
|||||||
fi
|
fi
|
||||||
echo "$dirs" | while read -r dir; do
|
echo "$dirs" | while read -r dir; do
|
||||||
echo "Generating checksums for $dir ..."
|
echo "Generating checksums for $dir ..."
|
||||||
duplicates="$( sha512sum "$dir"/* | sort | awk 'seen[$1]++' )"
|
duplicates="$( sha512sum "$dir"/* | sort -r | awk 'seen[$1]++' )"
|
||||||
if [ -n "$duplicates" ]; then
|
if [ -n "$duplicates" ]; then
|
||||||
echo "Deleting duplicates..."
|
echo "Deleting duplicates..."
|
||||||
echo "$duplicates" | cut -d' ' -f1,2 --complement |
|
echo "$duplicates" | cut -d' ' -f1,2 --complement |
|
||||||
|
Loading…
Reference in New Issue
Block a user