Skip to content
This repository was archived by the owner on Nov 7, 2024. It is now read-only.

Commit bc6df92

Browse files
committed
-z can now be used to set region for ipatool
1 parent 0bb31e2 commit bc6df92

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

azule

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ help () {
374374
echo
375375
echo "iOS Only:"
376376
echo " -x [Apple ID] [Password] Fetch and decrypt iPA with specified Apple ID"
377+
echo " -z [Country Code] Specify country code for ipatool"
377378
echo " -g Force Update Apps"
378379
echo " -l Don't Update Outdated Apps"
379380
else
@@ -476,10 +477,10 @@ trap "cleanup" SIGINT
476477
trap "cleanup" EXIT
477478

478479
# CLI ARGUEMENTS
479-
while getopts Hn:i:o:c:b:x:f:p:huSewsrDHqAdjRyUgFLklv args; do
480+
while getopts Hn:i:o:c:b:x:f:p:z:huSewsrDHqAdjRyUgFLklv args; do
480481

481482
# STUFF WITH PARAMETERS
482-
if [[ "$args" == @(x|n|b|p|i|o|c|f|A|H) ]]; then
483+
if [[ "$args" == @(x|n|b|p|i|o|c|f|A|H|z) ]]; then
483484
tmp=( "$OPTARG" )
484485
until [[ $(eval "echo \${$OPTIND}") =~ ^-.* ]] || [ -z "$(eval "echo \${$OPTIND}")" ]; do
485486
tmp+=( "$(eval "echo \${$OPTIND}")" )
@@ -492,7 +493,7 @@ while getopts Hn:i:o:c:b:x:f:p:huSewsrDHqAdjRyUgFLklv args; do
492493
if [[ "$args" == @(U|F) ]]; then
493494
Announce "-$args is not supported on your platform" 6
494495
fi
495-
elif [[ "$args" == @(x|l|g) ]]; then
496+
elif [[ "$args" == @(x|l|g|z) ]]; then
496497
Announce "-$args is not supported on your platform" 6
497498
fi
498499

@@ -508,6 +509,7 @@ while getopts Hn:i:o:c:b:x:f:p:huSewsrDHqAdjRyUgFLklv args; do
508509
o) outdir="$(expand "${tmp[*]}")" ;;
509510
p) displayname="${tmp[*]}" && run=1 ;;
510511
x) IPATOOL_EMAIL="${tmp[0]}" && unset "tmp[0]" && IPATOOL_PASSWORD="${tmp[*]}" ;;
512+
z) country_code="-c ${tmp[*]}" ;;
511513

512514
# SWITCHES
513515
e) remove_extensions=1 && run=1 ;;
@@ -717,12 +719,12 @@ if [[ ! -e "$ipadir" && "$os" == "iOS" ]]; then
717719

718720
# DOWNLOAD AND INSTALL UPDATES
719721
Announce "Downloading $ipadir..."
720-
ipatool download -b "$ipadir" --purchase --output "$dir/$ipadir.ipa"
722+
ipatool download -b "$ipadir" $country_code --purchase --output "$dir/$ipadir.ipa"
721723
status="$?"
722724
if [ "$status" == "1" ]; then
723725
rm -f "$azule/ipatool_authenticated"
724726
ipatool_auth
725-
ipatool download -b "$ipadir" --purchase --output "$dir/$ipadir.ipa"
727+
ipatool download -b "$ipadir" $country_code --purchase --output "$dir/$ipadir.ipa"
726728
status="$?"
727729
fi
728730

0 commit comments

Comments
 (0)