mirror of
https://gitlab.com/W1nst0n/universal-android-debloater.git
synced 2024-06-18 10:24:37 +12:00
Display a more useful error message when the phone is not detected by ADB (#18)
This commit is contained in:
parent
180930978a
commit
4c69c2cd60
|
@ -3,12 +3,14 @@
|
||||||
# BASH 4.3 or newer is needed ! (use of local -n)
|
# BASH 4.3 or newer is needed ! (use of local -n)
|
||||||
(( BASH_VERSINFO < 5 )) && echo "Please upgrade to a bash version >= 4.3"
|
(( BASH_VERSINFO < 5 )) && echo "Please upgrade to a bash version >= 4.3"
|
||||||
|
|
||||||
|
if ! $(adb get-state &>/dev/null); then echo "Your phone is not detected by ADB." && exit 1; fi
|
||||||
|
|
||||||
set -euo pipefail # Safer bash script
|
set -euo pipefail # Safer bash script
|
||||||
|
|
||||||
# Colors used for printing
|
# Colors used for printing
|
||||||
readonly BRED='\033[1;31m' # Bold + Red
|
readonly BRED='\033[1;31m' # Bold + Red
|
||||||
readonly BBLUE='\033[0;34m' # Bold + Blue
|
readonly BBLUE='\033[0;34m' # Bold + Blue
|
||||||
readonly BGREEN='\033[1;32m'
|
readonly BGREEN='\033[1;32m'²
|
||||||
readonly BORANGE='\033[1;33m'
|
readonly BORANGE='\033[1;33m'
|
||||||
readonly NC='\033[0m' # No Color
|
readonly NC='\033[0m' # No Color
|
||||||
readonly Bold=$(tput bold)
|
readonly Bold=$(tput bold)
|
||||||
|
|
Loading…
Reference in a new issue