new script to sync phone to pc
This commit is contained in:
parent
b50150b52e
commit
f4533ea7d6
19
pkgs/sane-scripts/src/bin/sane-sync-from-iphone
Executable file
19
pkgs/sane-scripts/src/bin/sane-sync-from-iphone
Executable 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/
|
Loading…
Reference in New Issue
Block a user