From a4eacc24cc4e6bc70d5f78be1714fecc41c65920 Mon Sep 17 00:00:00 2001 From: LukeZGD Date: Sat, 20 Nov 2021 21:56:52 +0800 Subject: [PATCH] Update --- resources/depends.sh | 4 ++-- restore.sh | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/resources/depends.sh b/resources/depends.sh index 826b61b..db9c90e 100755 --- a/resources/depends.sh +++ b/resources/depends.sh @@ -74,7 +74,7 @@ SaveExternal() { if [[ ! -d $External || ! -d $External/.git ]]; then Log "Downloading $External..." rm -rf $External - $git clone $ExternalURL $External + $git clone --depth 1 $ExternalURL $External fi if [[ ! $(ls $External/*.md) || ! -d $External/.git ]]; then rm -rf $External @@ -142,7 +142,7 @@ InstallDepends() { fi if [[ $platform == "linux" ]]; then - libimobiledevice=("https://github.com/LukeZGD/iOS-OTA-Downgrader-Keys/releases/download/tools/libimobiledevice_linux.zip" "4344b3ca95d7433d5a49dcacc840d47770ba34c4") + libimobiledevice=("https://github.com/LukeZGD/iOS-OTA-Downgrader-Keys/releases/download/tools/libimobiledevice_linux.zip" "95e2ffc86b35c71039fcf3ef732e30dd766112ce") fi if [[ ! -d ../resources/libimobiledevice_$platform && $MPath == "./resources"* ]]; then diff --git a/restore.sh b/restore.sh index 5ceeb7d..20664fe 100755 --- a/restore.sh +++ b/restore.sh @@ -76,7 +76,8 @@ Main() { fi Log "Checking Internet connection..." - if [[ ! $(ping -c1 1.1.1.1 2>/dev/null) ]]; then + ping -c1 8.8.8.8 >/dev/null + if [[ $? != 0 ]]; then Error "Please check your Internet connection before proceeding." fi @@ -85,9 +86,14 @@ Main() { elif [[ $(uname -m) != "x86_64" ]]; then Error "Only 64-bit (x86_64) distributions are supported." fi - - if [[ $1 == "Install" || ! $bspatch || ! $ideviceinfo || ! $irecoverychk || ! $python || + + if [[ $1 == "Install" || -z $bspatch || ! -e $ideviceinfo || ! -e $irecoverychk || + ! -e $ideviceenterrecovery || ! -e $iproxy || -z $python || ! -d ./resources/libimobiledevice_$platform ]]; then + if [[ ! -e $ideviceinfo || ! -e $irecoverychk || + ! -e $ideviceenterrecovery || ! -e $iproxy ]]; then + rm -rf ./resources/libimobiledevice_$platform + fi Clean InstallDepends fi