From bfb8f151dd7740c993f63e9a1092741b02f6e4f4 Mon Sep 17 00:00:00 2001 From: LukeeGD <26163116+LukeZGD@users.noreply.github.com> Date: Wed, 20 Nov 2024 20:59:18 +0800 Subject: [PATCH] Add error checking to unzip and zip to detect failure points when creating custom ipsws and other stuff --- restore.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/restore.sh b/restore.sh index 2442543..38fa92b 100755 --- a/restore.sh +++ b/restore.sh @@ -111,6 +111,17 @@ For 64-bit checkm8 devices compatible with pwned restores: ' } +unzip2="$(command -v unzip)" +zip2="$(command -v zip)" + +unzip() { + $unzip2 "$@" || error "An error occurred with the unzip operation: $*" +} + +zip() { + $zip2 "$@" || error "An error occurred with the zip operation: $*" +} + set_tool_paths() { : ' sets variables: platform, platform_ver, dir