From 7336ccb08a2915bef5eeb6959e83dc28b59738b5 Mon Sep 17 00:00:00 2001 From: Ivo Capanema Date: Wed, 9 Nov 2022 20:41:43 -0300 Subject: [PATCH] fix wrong option on checking empty variable --- reinstall-magisk-on-lineageos | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reinstall-magisk-on-lineageos b/reinstall-magisk-on-lineageos index d466280..a8909e4 100755 --- a/reinstall-magisk-on-lineageos +++ b/reinstall-magisk-on-lineageos @@ -5,7 +5,7 @@ set -e PHONE_ADB_SERIAL_NUMBER=${ADB_DEVICE} # The adb serial number can be found by running `adb devices`. if [$PHONE_ADB_SERIAL_NUMBER = '']; then PHONE_ADB_SERIAL_NUMBER=$(echo $(adb devices) | sed -rn 's/(^|(.* ))([^ ]*) device(( .*)|$)/\3/; T; p; q') - if [[ -n $PHONE_ADB_SERIAL_NUMBER ]]; then + if [[ -z $PHONE_ADB_SERIAL_NUMBER ]]; then print_message "ERROR: no suitable phone connected" exit 1 fi