Created
October 31, 2011 22:45
-
-
Save carlosmcevilly/1329282 to your computer and use it in GitHub Desktop.
Create a symbolic link on your desktop pointing to the iPhone Simulator Documents folder for a given app
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/bash | |
export appname=$1 | |
export simversion="4.3.2" | |
export approot=~/Library/Application\ Support/iPhone\ Simulator/$simversion/Applications | |
if [[ "$appname" == '' ]]; then | |
echo usage: $0 AppName | |
exit -1 | |
fi | |
if [[ -d "$approot" ]]; then | |
cd "$approot" | |
export appdir=`find . -type d -name "$appname.app" | cut -f2 -d'/'` | |
if [[ ! "$appdir" == '' ]]; then | |
cd $appdir | |
export fulldir=`pwd` | |
[[ -L ~/Desktop/$appname-Sim-Documents ]] && rm -f ~/Desktop/$appname-Sim-Documents | |
ln -s "$fulldir/Documents" ~/Desktop/$appname-Sim-Documents | |
if [[ $? == 0 ]]; then | |
echo "Shortcut created. check your desktop for $appname-Sim-Documents" | |
exit 0 | |
else | |
echo "Unknown error creating shortcut." | |
exit -2 | |
fi | |
fi | |
fi | |
echo "Run this script after you have installed the $appname app on the Simulator" | |
exit -3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment