From adcb0a19efd2bbcc9e4891af2e738335a7850163 Mon Sep 17 00:00:00 2001 From: LukeZGD Date: Sat, 10 Jul 2021 08:25:21 +0800 Subject: [PATCH] Update first checks --- restore.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/restore.sh b/restore.sh index 7b8fe2a..3910be3 100755 --- a/restore.sh +++ b/restore.sh @@ -59,19 +59,22 @@ Main() { Echo " Downgrader script by LukeZGD " echo + if [[ ! -d ./resources ]]; then + Error "resources folder cannot be found. Replace resources folder and try again." \ + "If resources folder is present try removing spaces from path/folder name" + fi + SetToolPaths + if [[ $? != 0 ]]; then + Error "Setting tool paths failed. Your copy of iOS-OTA-Downgrader seems to be incomplete." + fi if [[ ! $platform ]]; then Error "Platform unknown/not supported." fi - if [[ ! -d ./resources ]]; then - Error "resources folder cannot be found. Replace resources folder and try again" \ - "If resources folder is present try removing spaces from path/folder name" - fi - chmod +x ./resources/*.sh ./resources/tools/* - if [[ $? == 1 ]]; then + if [[ $? != 0 ]]; then Log "Warning - An error occurred in chmod. This might cause problems..." fi