diff --git a/gendeb.sh b/gendeb.sh index fc6ac7ef..60252d8e 100755 --- a/gendeb.sh +++ b/gendeb.sh @@ -1,3 +1,4 @@ +#!/bin/bash if ! which unipkg &> /dev/null; then echo "unipkg is not installed. Install with npm install -g unipkg." exit 1 @@ -5,6 +6,14 @@ 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_REQUIRED=NO CODE_SIGN_IDENTITY="" -archivePath "$OUTDIR" | xcpretty if [ ${PIPESTATUS[0]} -eq 0 ]; then cd "$OUTDIR/Products" @@ -14,6 +23,7 @@ if [ ${PIPESTATUS[0]} -eq 0 ]; then cd .. INDS_VER=$INDS_VER unipkg build "Products" cp "net.nerd.iNDS_${INDS_VER}_iphoneos-arm.deb" ../ + echo -e "\nThe deb can be found at dist/net.nerd.iNDS_${INDS_VER}_iphoneos-arm.deb" else - echo "\nBuild failed!" + echo -e "\nBuild failed!" fi \ No newline at end of file diff --git a/genipa.sh b/genipa.sh index 9bf72fa0..9a7f0ef8 100755 --- a/genipa.sh +++ b/genipa.sh @@ -1,5 +1,13 @@ +#!/bin/bash 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_REQUIRED=NO CODE_SIGN_IDENTITY="" -archivePath "$OUTDIR" | xcpretty if [ ${PIPESTATUS[0]} -eq 0 ]; then cd "$OUTDIR/Products" @@ -7,7 +15,7 @@ if [ ${PIPESTATUS[0]} -eq 0 ]; then zip -r "iNDS.ipa" "Payload" cp "iNDS.ipa" ../../ cd $ORIG - echo "\nThe unsigned IPA can be found at dist/iNDS.ipa" + echo -e "\nThe unsigned IPA can be found at dist/iNDS.ipa" else - echo "\nBuild failed!" + echo -e "\nBuild failed!" fi \ No newline at end of file