]> Git — Sourcephile - julm/podcasts.git/blob - send-redmi.sh
exclude more transfers
[julm/podcasts.git] / send-redmi.sh
1 #!/usr/bin/env bash
2 set -eux
3 cd "${0%/*}"
4
5 mtp=${mtp:-mtp://Xiaomi_SDM439-QRD__SN%3AB0796589_c7565cf60006/}
6 trap 'gio mount -u "$mtp"' EXIT
7 gio info "$mtp" >/dev/null ||
8 gio mount "$mtp"
9
10 ./copy-new.sh
11
12 rsync -rv --remove-source-files \
13 --exclude "*.part" \
14 --exclude "*.jpg" \
15 --exclude "*.png" \
16 --exclude "*.aria2" \
17 --exclude "LaSérieDocumentaire" \
18 --exclude "TousAuLarzac" \
19 --exclude "HomeScience" \
20 --exclude "FunScience" \
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/science/LeVortex/*" \
39 --exclude "/video/politique/*" \
40 --exclude ".*" \
41 --exclude "dn" \
42 --exclude "hors-serie" \
43 --no-inc-recursive --info=progress2 \
44 --size-only --inplace --partial --progress -i \
45 new/{audio,video,documents,films} \
46 /run/user/"$(id -u)"/gvfs/'mtp:host='Xiaomi_SDM439-QRD__SN%3AB0796589_c7565cf60006/"Carte SD SanDisk/Android/data/com.termux/files/"