Browse Source

changed print_messagem position

dev-ivo
Ivo Oliveira Capanema 2 years ago
parent
commit
5ab69f335f
  1. 8
      reinstall-magisk-on-lineageos

8
reinstall-magisk-on-lineageos

@ -2,6 +2,10 @@
set -e set -e
print_message() {
printf "$1\n"
}
PHONE_ADB_SERIAL_NUMBER=${ADB_DEVICE} # The adb serial number can be found by running `adb devices`. PHONE_ADB_SERIAL_NUMBER=${ADB_DEVICE} # The adb serial number can be found by running `adb devices`.
if [$PHONE_ADB_SERIAL_NUMBER = '']; then if [$PHONE_ADB_SERIAL_NUMBER = '']; then
PHONE_ADB_SERIAL_NUMBER=$(echo $(adb devices) | sed -rn 's/(^|(.* ))([^ ]*) device(( .*)|$)/\3/; T; p; q') PHONE_ADB_SERIAL_NUMBER=$(echo $(adb devices) | sed -rn 's/(^|(.* ))([^ ]*) device(( .*)|$)/\3/; T; p; q')
@ -11,10 +15,6 @@ if [$PHONE_ADB_SERIAL_NUMBER = '']; then
fi fi
fi fi
print_message() {
printf "$1\n"
}
check_phone_is_connected() { check_phone_is_connected() {
if ! adb devices | grep --silent "$PHONE_ADB_SERIAL_NUMBER"; then if ! adb devices | grep --silent "$PHONE_ADB_SERIAL_NUMBER"; then
print_message "ERROR: phone '$PHONE_ADB_SERIAL_NUMBER' is not connected" print_message "ERROR: phone '$PHONE_ADB_SERIAL_NUMBER' is not connected"

Loading…
Cancel
Save