]> Git — Sourcephile - julm/podcasts.git/blob - send-redmi.sh
send-redmi: do not send snapshots
[julm/podcasts.git] / send-redmi.sh
1 #!/usr/bin/env bash
2 set -eux
3 cd "${0%/*}"
4
5 mkdir -p ~/mnt/redmi
6 trap "umount ~/mnt/redmi" EXIT
7 umount ~/mnt/redmi || true
8 mountpoint ~/mnt/redmi || {
9 go-mtpfs -android ~/mnt/redmi &
10 }
11 sleep 1
12 mountpoint ~/mnt/redmi
13
14 ./copy-new.sh
15
16 rsync -rv --remove-source-files \
17 --exclude "*.part" \
18 --exclude "*.jpg" \
19 --exclude "*.png" \
20 --exclude "*.aria2" \
21 --exclude "LaSérieDocumentaire" \
22 --exclude "TousAuLarzac" \
23 --exclude "CestCash" \
24 --exclude "thinkerview" \
25 --include "/audio/SmashingSecurity/2021-*" \
26 --exclude "/audio/SmashingSecurity/*" \
27 --include "/audio/NakedSecurity/2021-*" \
28 --exclude "/audio/NakedSecurity/*" \
29 --include "/audio/FOSSAndCrafts/2021-*" \
30 --exclude "/audio/FOSSAndCrafts/*" \
31 --exclude "/video/fun/fremo/*" \
32 --exclude "/video/science/numberphile/*" \
33 --exclude "/video/politique/QG/*" \
34 --include "/video/science/PrimumNonNocere/2021-*" \
35 --exclude "/video/science/PrimumNonNocere/2020-*" \
36 --include "/video/science/Asclépios/2021-*" \
37 --exclude "/video/science/Asclépios/2020-*" \
38 --include "/video/science/LeSenseOfWonder/2022-*" \
39 --exclude "/video/science/LeSenseOfWonder/*" \
40 --exclude "/video/politique/*" \
41 --exclude ".*" \
42 --exclude "dn" \
43 --exclude "hors-serie" \
44 --no-inc-recursive --info=progress2 \
45 --size-only --inplace --partial --progress -i \
46 new/{audio,video,documents,films} \
47 ~/mnt/redmi/"Carte SD SanDisk/Android/data/com.termux/files/"