forked from iNDS-Team/iNDS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
genipa.sh
executable file
·27 lines (24 loc) · 735 Bytes
/
genipa.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
if ! which ldid &> /dev/null; then
echo "ldid is not installed. Install with brew install ldid."
exit 1
fi
OUTDIR=./dist/out.xcarchive
ORIG=$(pwd)
# Cleanup
if [ -d "$OUTDIR" ]; then
echo "Cleaning previous build..."
rm -r $OUTDIR
fi
xcodebuild -workspace iNDS.xcworkspace -scheme iNDS archive CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY="" -archivePath "$OUTDIR" | xcpretty
if [ ${PIPESTATUS[0]} -eq 0 ]; then
cd "$OUTDIR/Products"
ldid -S "Applications/iNDS.app/iNDS"
mv "Applications" "Payload"
zip -r "iNDS.ipa" "Payload"
cp "iNDS.ipa" ../../
cd $ORIG
echo -e "\nThe unsigned IPA can be found at dist/iNDS.ipa"
else
echo -e "\nBuild failed!"
fi