sourcephile
/
git
/
julm
/
camera.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f994ee
)
pull: add mo
author
Julien Moutinho
<julm@sourcephile.fr>
Sat, 6 Jan 2024 16:03:33 +0000
(17:03 +0100)
committer
Julien Moutinho
<julm@sourcephile.fr>
Sat, 6 Jan 2024 16:03:33 +0000
(17:03 +0100)
mo/pull.sh
[new file with mode: 0755]
patch
|
blob
diff --git a/mo/pull.sh
b/mo/pull.sh
new file mode 100755
(executable)
index 0000000..
052a8fa
--- /dev/null
+++ b/
mo/pull.sh
@@ -0,0
+1,18
@@
+#!/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