Update restore.sh

This commit is contained in:
LukeeGD 2020-09-16 16:46:46 +08:00
parent 20aba8fee6
commit 5e690a4eab

View File

@ -86,8 +86,10 @@ function Main {
Log "Finding device in normal mode..." Log "Finding device in normal mode..."
ideviceinfo2=$($ideviceinfo -s) ideviceinfo2=$($ideviceinfo -s)
Log "Finding device in DFU/recovery mode..." if [[ $? != 0 ]]; then
[[ $? != 0 ]] && irecovery2=$($irecovery -q 2>/dev/null | grep 'MODE' | cut -c 7-) Log "Finding device in DFU/recovery mode..."
irecovery2=$($irecovery -q 2>/dev/null | grep 'MODE' | cut -c 7-)
fi
[[ $irecovery2 == "DFU" ]] && DFUDevice=1 [[ $irecovery2 == "DFU" ]] && DFUDevice=1
[[ $irecovery2 == "Recovery" ]] && RecoveryDevice=1 [[ $irecovery2 == "Recovery" ]] && RecoveryDevice=1