]> Git — Sourcephile - julm/podcasts.git/blob - copy-new.sh
handle more extensions
[julm/podcasts.git] / copy-new.sh
1 #!/usr/bin/env bash
2 set -eux
3 cd "${0%/*}"
4 rsync -ai \
5 --exclude '*.disable' \
6 --exclude '*.part' \
7 --exclude '*.aria2' \
8 --include '.*' \
9 --include '*/' \
10 --exclude '*' \
11 new/ old/
12
13 # Hardlink files between new/ and old/
14 cd new
15 find . -type d -exec \
16 rsync -lptgodDi \
17 --exclude '*.disable' \
18 --exclude '*.part' \
19 --exclude '*.part-Frag*' \
20 --exclude '*.aria2' \
21 --link-dest "$PWD"/{}/ \
22 {}/ ../old/{}/ \;