From a82d78451af4767024ce32fccc245601664d14f7 Mon Sep 17 00:00:00 2001 From: LukeZGD Date: Wed, 21 Jul 2021 09:54:37 +0800 Subject: [PATCH] more specific lsusb --- resources/device.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/device.sh b/resources/device.sh index f928c2b..500d3fb 100755 --- a/resources/device.sh +++ b/resources/device.sh @@ -10,7 +10,7 @@ FindDevice() { Log "Finding device in $1 mode..." while (( $i < $Timeout )); do - [[ $platform == "linux" ]] && DeviceIn=$(lsusb | grep -c $USB) + [[ $platform == "linux" ]] && DeviceIn=$(lsusb | grep -c "05ac:$USB") [[ $platform == "macos" && $($irecovery -q 2>/dev/null | grep -w "MODE" | cut -c 7-) == "$1" ]] && DeviceIn=1 if [[ $DeviceIn == 1 ]]; then Log "Found device in $1 mode."