2023-11-04 19:10:15 +01:00
|
|
|
#!/bin/sh
|
2023-09-12 01:16:35 +02:00
|
|
|
# Move common files into their place from the downloads folder.
|
2023-11-04 19:10:15 +01:00
|
|
|
d5=$DATA/5-*
|
|
|
|
dow=$d5/download
|
|
|
|
|
|
|
|
# Internal Duplicates
|
2025-02-04 11:52:56 +01:00
|
|
|
script1=/tmp/dedup-download_$(date +%s)_internal.sh
|
|
|
|
rmlint --rank-by=Olam -o pretty -o sh:$script1 $dow/*.*
|
2023-11-04 19:10:15 +01:00
|
|
|
printf "Enter to confirm, any text to skip (answer does not matter if nothing is printed above this). "
|
2023-09-12 01:16:35 +02:00
|
|
|
read -r answer
|
2025-02-04 11:52:56 +01:00
|
|
|
test -n "$answer" || $script1 -d
|
2023-11-04 19:10:15 +01:00
|
|
|
|
|
|
|
# Songs
|
2023-09-12 01:16:35 +02:00
|
|
|
mv -v -- $dow/*.mp3 $dow/*.flac $dow/*.wav $MUSIC/
|
2023-11-04 19:10:15 +01:00
|
|
|
mv -v -- $dow/*.iso $DATA/4-*/flash/
|
|
|
|
|
|
|
|
# Data-dir duplicates
|
2025-02-04 11:52:56 +01:00
|
|
|
script2=/tmp/dedup-download_$(date +%s)_data.sh
|
|
|
|
rmlint --keep-all-tagged --max-depth=5 --rank-by=Odlam -o pretty -o sh:$script2 $d5 // $DATA/1-* $DATA/2-* $DATA/3-* $DATA/4-*
|
2023-11-04 19:10:15 +01:00
|
|
|
printf "Enter to confirm, any text to skip (answer does not matter if nothing is printed above this). "
|
|
|
|
read -r answer
|
2025-02-04 11:52:56 +01:00
|
|
|
test -n "$answer" || $script2 -d
|