better error message

This commit is contained in:
Ivo Oliveira Capanema 2022-11-09 23:41:47 -03:00
parent 716ed4adbe
commit 4d4b1b6cfa

View File

@ -10,7 +10,7 @@ PHONE_ADB_SERIAL_NUMBER=${ADB_DEVICE} # The adb serial number can be found by ru
if [$PHONE_ADB_SERIAL_NUMBER = '']; then
PHONE_ADB_SERIAL_NUMBER=$(echo $(adb devices) | sed -rn 's/(^|(.* ))([^ ]*) device(( .*)|$)/\3/; T; p; q')
if [[ -z $PHONE_ADB_SERIAL_NUMBER ]]; then
print_message "ERROR: no suitable phone connected"
print_message "ERROR: no phone connected or connection unauthorized"
exit 1
fi
fi