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/