]> Git — Sourcephile - julm/camera.git/blob - sevy/pull.sh
reencode: increase quality to preset=5
[julm/camera.git] / sevy / pull.sh
1 #!/usr/bin/env bash
2 host=Xiaomi_SDM439-QRD__SN%3AE77E9453_c645cda90006
3 cd "${0%/*}"
4 set -eux
5 gio mount -l | grep mtp://"$host" ||
6 gio mount mtp://"$host"/"Carte SD SanDisk"/
7
8 year=${year:-$(date +%Y)}
9
10 # FIXME: handle previous year on new year
11 mkdir -p "$year"/src
12 for month in {01..12}; do
13 rsync -ai --no-inc-recursive --info=progress2 --inplace --partial \
14 --size-only \
15 --include "???_$year$month*" --exclude '*' \
16 /run/user/"$(id -u)"/gvfs/mtp:host="$host"/"Espace de stockage interne partagé"/DCIM/Camera/ \
17 /run/user/"$(id -u)"/gvfs/mtp:host="$host"/"Carte SD SanDisk"/DCIM/Camera/ \
18 "$year"/src/"$month"
19 done