From 49a564ccddae0745638f0547b4f7d94c2dce74c4 Mon Sep 17 00:00:00 2001 From: CoocooFroggy <45371102+CoocooFroggy@users.noreply.github.com> Date: Mon, 19 Jul 2021 23:30:15 -0400 Subject: [PATCH] Support irecovery 1.0.1 (#109) * irecovery 1.0.1 * Better solution --- resources/device.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/device.sh b/resources/device.sh index 159be99..834c937 100755 --- a/resources/device.sh +++ b/resources/device.sh @@ -10,7 +10,7 @@ FindDevice() { Log "Finding device in $1 mode..." while (( $i < $Timeout )); do - [[ $($irecovery -q 2>/dev/null | grep "MODE" | cut -c 7-) == "$1" ]] && DeviceIn=1 + [[ $($irecovery -q 2>/dev/null | grep -w "MODE" | cut -c 7-) == "$1" ]] && DeviceIn=1 if [[ $DeviceIn == 1 ]]; then Log "Found device in $1 mode." DeviceState="$1" @@ -33,7 +33,7 @@ GetDeviceValues() { ideviceinfo2=$($ideviceinfo -s) if [[ $? != 0 ]]; then Log "Finding device in DFU/recovery mode..." - DeviceState="$($irecovery -q 2>/dev/null | grep "MODE" | cut -c 7-)" + DeviceState="$($irecovery -q 2>/dev/null | grep -w "MODE" | cut -c 7-" else DeviceState="Normal" fi