new script to sync phone to pc

This commit is contained in:
colin 2022-06-15 18:01:40 -07:00
parent b50150b52e
commit f4533ea7d6

View File

@ -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/