Created
September 22, 2014 15:23
-
-
Save mwhuss/4398243e9eea93f2083a to your computer and use it in GitHub Desktop.
opensim script updated for Xcode 6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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