From 5f27ef2db6f072ec203ea346fdcb7566421acfc5 Mon Sep 17 00:00:00 2001 From: LukeZGD Date: Tue, 9 Nov 2021 16:59:56 +0800 Subject: [PATCH] Fix "Downgrade command not found" also fix main menu items --- resources/downgrade.sh | 2 +- restore.sh | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/resources/downgrade.sh b/resources/downgrade.sh index 56cd132..2f35e0d 100755 --- a/resources/downgrade.sh +++ b/resources/downgrade.sh @@ -61,7 +61,7 @@ Downgrade() { curl -L https://github.com/LukeZGD/iOS-OTA-Downgrader-Keys/raw/master/$ProductType/$BuildVer/index.html -o tmp/index.html mv tmp/index.html resources/firmware/$ProductType/$BuildVer - if [[ $DeviceProc != 7 ]]; then + elif [[ $DeviceProc != 7 ]]; then Input "Jailbreak Option" Echo "* When this option is enabled, your device will be jailbroken on restore." if [[ $ProductType == "iPad2,5" || $ProductType == "iPad2,6" || $ProductType == "iPad2,7" ]]; then diff --git a/restore.sh b/restore.sh index 4300876..d25ba0d 100755 --- a/restore.sh +++ b/restore.sh @@ -104,15 +104,11 @@ Main() { if [[ $SkipMainMenu == 1 && $1 != "NoColor" && $1 != "NoDevice" ]]; then Mode="$1" else - if [[ $1 != "NoDevice" ]]; then - Selection+=("Downgrade Device") - fi + [[ $1 != "NoDevice" ]] && Selection+=("Downgrade Device") Selection+=("Save OTA Blobs") - if [[ $DeviceProc != 7 ]] && [[ $DeviceState == "Normal" || $1 == "NoDevice" ]]; then + if [[ $DeviceProc != 7 ]]; then Selection+=("Create Custom IPSW") - fi - if [[ $DeviceProc != 7 && $DeviceState == "Normal" ]]; then - Selection+=("Put Device in kDFU Mode") + [[ $DeviceState == "Normal" ]] && Selection+=("Put Device in kDFU Mode") fi Selection+=("(Re-)Install Dependencies" "(Any other key to exit)") Echo "*** Main Menu ***"