Skip to content

Instantly share code, notes, and snippets.

@joshuatbrown
Created May 6, 2010 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshuatbrown/392413 to your computer and use it in GitHub Desktop.
Save joshuatbrown/392413 to your computer and use it in GitHub Desktop.
Builds the iPhone project in the current directory for ad-hoc distribution
if [[ $# == 0 ]]; then
echo "ERROR: Please supply target name"
echo "Required usage: xdist <target-name>"
echo "Optional usage: xdist <target-name> <destination-directory> (defaults to Desktop)"
exit 1
elif [[ $# == 1 ]]; then
target="$1"
dest=~/Desktop
elif [[ $# == 2 ]]; then
target="$1"
dest="$2"
fi
xcodebuild clean
xcodebuild -target $target -sdk /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/ -configuration Release
mkdir Payload
mv build/Release-iphoneos/$target.app Payload/
zip -r $dest/$target.ipa Payload
rm -rf Payload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment