mirror of
https://gitlab.com/W1nst0n/universal-android-debloater.git
synced 2024-05-08 19:42:19 +12:00
Better bash version check (#60)
This commit is contained in:
parent
39d6ab29d6
commit
e410b3d9fe
|
@ -1,7 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# BASH 4.4 or newer is needed!
|
||||
if (( "${BASH_VERSINFO[0]}" < 5 )); then printf "\n%s\n\n" "Please upgrade to a bash version >= 4.4" && exit 1; fi
|
||||
if (( "${BASH_VERSINFO[0]}" < 4 || ("${BASH_VERSINFO[0]}" == 4 && "${BASH_VERSINFO[1]}" < 4) )); then
|
||||
printf "\n%s\n\n" "Please upgrade to a bash version >= 4.4" && exit 1;
|
||||
fi
|
||||
|
||||
if ! adb get-state &>/dev/null; then printf "\n%s\n\n" "Your phone is not detected by ADB." && exit 1; fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue