Skip to content

Instantly share code, notes, and snippets.

@simonjodet
Last active December 11, 2015 18:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonjodet/4644277 to your computer and use it in GitHub Desktop.
Save simonjodet/4644277 to your computer and use it in GitHub Desktop.
This code mounts the USB Hard Drive where the iPhoto library is stored, launch iPhoto then unmount the drive when iPhoto is closed.
VOL='/dev/'$(diskutil list | grep -Eo '.*Apple_HFS Pictures.*' | grep -Eo 'disk.s.')
hdiutil mountvol $VOL
open -W /Applications/iPhoto.app
hdiutil detach $VOL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment