Browse Source

make ADB_DEVICE environment variable optional

pull/1/head^2
gabriel becker 2 years ago
parent
commit
9dff87040a
  1. 4
      README.md
  2. 3
      reinstall-magisk-on-lineageos

4
README.md

@ -25,7 +25,9 @@ Steps:
1. Build <br> 1. Build <br>
```docker build -t magiskupdate .``` ```docker build -t magiskupdate .```
2. Run <br> 2. Run <br>
```docker run --env ADB_DEVICE=<PUT YOUR ADB ADDR HERE> magiskupdate``` ```docker run --env ADB_DEVICE=<PUT YOUR ADB ADDR HERE> magiskupdate``` \
or, if you're lazy do:
```docker run magiskupdate```
## Bash ## Bash

3
reinstall-magisk-on-lineageos

@ -3,6 +3,9 @@
set -e set -e
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
PHONE_ADB_SERIAL_NUMBER=$(echo $(adb devices) | sed -rn 's/(^|(.* ))([^ ]*) device(( .*)|$)/\3/; T; p; q')
fi
print_message() { print_message() {
printf "$1\n" printf "$1\n"

Loading…
Cancel
Save