]> Git — Sourcephile - julm/camera.git/blob - mo/pull.sh
pull: add mo
[julm/camera.git] / mo / pull.sh
1 #!/usr/bin/env bash
2 host=Fairphone_FP3_A209PB4N0202
3 cd "${0%/*}"
4 set -eux
5 gio mount -l | grep mtp://"$host" ||
6 gio mount mtp://"$host"/CARTE_SD/
7
8 year=${year:-$(date +%Y)}
9
10 mkdir -p "$year"/src
11 for month in {01..12}
12 do
13 rsync -ai --no-inc-recursive --info=progress2 --inplace --partial \
14 --include "???_2023${month}*" \
15 --exclude '*' \
16 /run/user/1000/gvfs/mtp:host="$host"/CARTE_SD/DCIM/Camera/ \
17 "$year"/src/"$month"
18 done