Skip to content

Instantly share code, notes, and snippets.

@rustymyers
Created September 24, 2012 12:26
Show Gist options
  • Save rustymyers/3775700 to your computer and use it in GitHub Desktop.
Save rustymyers/3775700 to your computer and use it in GitHub Desktop.
When you need to run a script against a volume that has not been restored first, you can set the $DS_LAST_RESTORED_VOLUME to the internal drive of the Mac. This allows a script to work with or without restoring in a workflow.
DS_LAST_RESTORED_VOLUME=`system_profiler SPSerialATADataType | awk -F': ' '/Mount Point/ { print $2}'|head -n1`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment