Created
September 13, 2013 02:29
-
-
Save bluebanboom/6546211 to your computer and use it in GitHub Desktop.
编译ipa的脚本
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 | |
outpath="$HOME/"$PRODUCT_NAME"_IPAs" | |
subdirname=`date "+%Y-%m-%d_%H.%M.%S"` | |
ipaname=$PRODUCT_NAME"_"$subdirname".ipa" | |
apppath=$TARGET_BUILD_DIR"/"$PRODUCT_NAME".app" | |
sympath=$TARGET_BUILD_DIR"/"$PRODUCT_NAME".app.dSYM" | |
echo $outpath | |
if [ -d $outpath ]; then | |
echo $outpath" exist" | |
else | |
mkdir $outpath | |
fi | |
outpath=$outpath"/"$subdirname | |
mkdir -p $outpath"/$PRODUCT_NAME/Payload" | |
cp -R $apppath $outpath"/$PRODUCT_NAME/Payload" | |
cp -R $sympath $outpath | |
pushd $outpath | |
zip -r $ipaname $PRODUCT_NAME | |
popd | |
echo "work done!" | |
#---------------------------- | |
# PRODUCT_NAME="MoreApps" | |
# TARGET_BUILD_DIR="/Users/sina/Library/Developer/Xcode/DerivedData/MoreApps-boiufivjpkwlrvglsuukvzvxfode/Build/Products/Debug-iphoneos" | |
# outpath="$HOME/"$PRODUCT_NAME"_IPAs" | |
# subdirname=`date "+%Y-%m-%d_%H.%M.%S"` | |
# | |
# ipaname=$PRODUCT_NAME"_"$subdirname".ipa" | |
# apppath=$TARGET_BUILD_DIR"/"$PRODUCT_NAME".app" | |
# sympath=$TARGET_BUILD_DIR"/"$PRODUCT_NAME".app.dSYM" | |
# | |
# echo $outpath | |
# if [ -d $outpath ]; then | |
# echo $outpath" exist" | |
# else | |
# mkdir $outpath | |
# fi | |
# | |
# dirname=`date "+%Y-%m-%d_%H.%M.%S"` | |
# #workpath=$outpath"/"$dirname | |
# outpath=$outpath"/"$dirname | |
# mkdir -p $workpath"/$PRODUCT_NAME/Payload" | |
# cp -R $TARGET_BUILD_DIR"/"$PRODUCT_NAME".app" $workpath"/$PRODUCT_NAME/Payload" | |
# cp -R $TARGET_BUILD_DIR"/"$PRODUCT_NAME".app.dSYM" $workpath | |
# pushd $workpath | |
# zip -r $PRODUCT_NAME"_"$dirname".ipa" $PRODUCT_NAME | |
# popd | |
# echo "work done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment