From f4533ea7d607f8b25e7d2fe0b67694d36994d684 Mon Sep 17 00:00:00 2001 From: colin Date: Wed, 15 Jun 2022 18:01:40 -0700 Subject: [PATCH] new script to sync phone to pc --- .../src/bin/sane-sync-from-iphone | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 pkgs/sane-scripts/src/bin/sane-sync-from-iphone diff --git a/pkgs/sane-scripts/src/bin/sane-sync-from-iphone b/pkgs/sane-scripts/src/bin/sane-sync-from-iphone new file mode 100755 index 00000000..252ba99e --- /dev/null +++ b/pkgs/sane-scripts/src/bin/sane-sync-from-iphone @@ -0,0 +1,19 @@ +#!/usr/bin/env zsh +# this really does need zsh because bash `test -e` behaves differently +set -ex + +# make sure the mountpoint exists +if ! (test -e /mnt/iphone) +then + sudo mkdir /mnt/iphone + sudo chown colin:users /mnt/iphone +fi + +# make sure the device is mounted +if ! (test -d /mnt/iphone/DCIM) +then + umount /mnt/iphone || true + ifuse /mnt/iphone +fi + +rsync -arv /mnt/iphone/DCIM/ /home/colin/Pictures/iphone/