From f68f3d4fae8a96e3e8ef1caa0a361af7cfe7d924 Mon Sep 17 00:00:00 2001 From: LukeZGD <26163116+LukeZGD@users.noreply.github.com> Date: Thu, 27 Apr 2023 21:39:11 +0800 Subject: [PATCH] Change iTunes version print --- restore.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/restore.sh b/restore.sh index 3806284..85c36a1 100755 --- a/restore.sh +++ b/restore.sh @@ -253,13 +253,14 @@ set_tool_paths() { fi log "iTunes version: $itunes_ver" if [[ $(echo "$itunes_ver" | cut -c -2) == 12 ]]; then - itunes_ver=$(echo "$itunes_ver" | cut -c 4-) - itunes_ver=${itunes_ver%%.*} - if (( itunes_ver > 6 )); then + local itunes_ver2=$(echo "$itunes_ver" | cut -c 4-) + itunes_ver2=${itunes_ver%%.*} + if (( itunes_ver2 > 6 )); then warn "Detected a newer iTunes version." print "* Please downgrade iTunes to 12.6.5, 12.4.3, or older." print "* You may still continue, but you might encounter issues with restoring the device." pause + itunes_ver+=" (please downgrade to 12.6.5 or older)" fi fi else