syncPhotos.sh 448 B

12345678910111213141516171819
  1. #!/bin/bash
  2. BASE_LOCAL="/Volumes/iPhoto"
  3. BASE_REMOTE="/Volumes/webdav.opendrive.com"
  4. MOUNTED_PHOTOS=0
  5. if [ ! -d /Volumes/iPhoto ]; then
  6. MOUNTED_PHOTOS=1
  7. hdiutil attach -readonly /mnt/media/Pictures/iPhoto.sparsebundle >/dev/null 2>&1
  8. fi
  9. if [ -d /Volumes/iPhoto ]; then
  10. ~/bin/video/backup/sync.sh Shared.photolibrary 1000
  11. if [ $MOUNTED_PHOTOS -gt 0 ]; then
  12. hdiutil detach /Volumes/iPhoto >/dev/null 2>&1
  13. fi
  14. fi
  15. # Always exit cleanly
  16. exit 0