Skip to content

Instantly share code, notes, and snippets.

@mwhuss
Created September 22, 2014 15:23
Show Gist options
  • Save mwhuss/4398243e9eea93f2083a to your computer and use it in GitHub Desktop.
Save mwhuss/4398243e9eea93f2083a to your computer and use it in GitHub Desktop.
opensim script updated for Xcode 6
#!/bin/sh
if [ -z "$1" ]; then
echo "usage: $0 [ Preferences | ]"
else
base=~/Library/Developer/CoreSimulator/Devices
apps=Applications
app=`ls -1td "$base/"*"/Data/$apps/"*"/$1.app" | head -1`
echo $app
if [ -n "$app" ]; then
dir=`dirname "$app"`
if [ "$2" = "Preferences" ]; then
open "$dir/Library/Preferences"
else
open "$dir/Documents/$2"
fi
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment