]> Git — Sourcephile - julm/podcasts.git/blob - send-redmi.sh
init
[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 "*.aria2" \
19 --exclude "LaSérieDocumentaire" \
20 --exclude "TousAuLarzac" \
21 --exclude "CestCash" \
22 --exclude "thinkerview" \
23 --include "/audio/SmashingSecurity/2021-*" \
24 --exclude "/audio/SmashingSecurity/*" \
25 --include "/audio/NakedSecurity/2021-*" \
26 --exclude "/audio/NakedSecurity/*" \
27 --include "/audio/FOSSAndCrafts/2021-*" \
28 --exclude "/audio/FOSSAndCrafts/*" \
29 --exclude "/video/fun/fremo/*" \
30 --exclude "/video/science/numberphile/*" \
31 --exclude "/video/politique/QG/*" \
32 --include "/video/science/PrimumNonNocere/2021-*" \
33 --exclude "/video/science/PrimumNonNocere/2020-*" \
34 --include "/video/science/Asclépios/2021-*" \
35 --exclude "/video/science/Asclépios/2020-*" \
36 --include "/video/science/LeSenseOfWonder/2022-*" \
37 --exclude "/video/science/LeSenseOfWonder/*" \
38 --exclude "/video/politique/*" \
39 --exclude ".*" \
40 --exclude "dn" \
41 --exclude "hors-serie" \
42 --no-inc-recursive --info=progress2 \
43 --size-only --inplace --partial --progress -i \
44 new/{audio,video,documents,films} \
45 ~/mnt/redmi/"Carte SD SanDisk/Android/data/com.termux/files/"