#!/usr/bin/env bash host=Fairphone_FP3_A209PB4N0202 cd "${0%/*}" set -eux gio mount -l | grep mtp://"$host" || gio mount mtp://"$host"/CARTE_SD/ year=${year:-$(date +%Y)} mkdir -p "$year"/src for month in {01..12} do rsync -ai --no-inc-recursive --info=progress2 --inplace --partial \ --include "???_2023${month}*" \ --exclude '*' \ /run/user/1000/gvfs/mtp:host="$host"/CARTE_SD/DCIM/Camera/ \ "$year"/src/"$month" done