-
Notifications
You must be signed in to change notification settings - Fork 0
/
adb-helper.sh
executable file
·40 lines (40 loc) · 1.2 KB
/
adb-helper.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
declare -a adbHelperRoot=~/Applications/adb-helper # root path of program
source $adbHelperRoot/config.sh
folder=$(basename "$PWD");
echo "\n🛎 ADB Helper 🛎 "
echo "You are in: $folder\n"
echo "1. 🤖 Compile & install"
echo "2. 📦 Install APK"
echo "3. ⚗️ Pre-CI checks"
echo "4. 📷 Screenshot"
echo "5. 📹 Screen record"
echo "6. 🧰 Utils"
trap '{ echo "\nExiting... Bye bye! 👋"; exit; }' INT
read -n 1 -s CHOICE
if [[ $CHOICE == 1 ]]; then
source $adbHelperRoot/tools/compile.sh
#source $adbHelperRoot/tools/compile-discovery.sh
#clear # TODO this prevents to show the no device error
elif [[ $CHOICE == 2 ]]; then
source $adbHelperRoot/tools/install.sh
clear
elif [[ $CHOICE == 3 ]]; then
source $adbHelperRoot/tools/precichecks.sh
clear
elif [[ $CHOICE == 4 ]]; then
source $adbHelperRoot/tools/screenshot.sh
clear
elif [[ $CHOICE == 5 ]]; then
source $adbHelperRoot/tools/recordscreen.sh
clear
elif [[ $CHOICE == 6 ]]; then
source $adbHelperRoot/tools/utils.sh
clear
elif [[ $CHOICE == "q" ]]; then
echo "\nExiting... Bye bye! 👋"
exit
else
echo "\n🤷 Incorrect choice. Choose between 1 and 5, or \"q\" to exit."
fi
source $adbHelperRoot/adb-helper.sh