-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·68 lines (58 loc) · 2.47 KB
/
install.sh
File metadata and controls
executable file
·68 lines (58 loc) · 2.47 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
OS="$(uname)"
UNAME_MACHINE="$(/usr/bin/uname -m)"
USER_PLATFORM="$OS $UNAME_MACHINE"
install_app() {
echo -e "\n---------------------- Installing Application ----------------------"
echo -e "Installing latest version: $LATEST_VERSION on $USER_PLATFORM\n"
if [[ "$USER_PLATFORM" == "Darwin arm64" ]]
then
curl -sL https://github.com/anthonygress/Android-Toolkit/releases/latest/download/Android-Toolkit-arm64.zip --output ~/Downloads/Android-Toolkit.zip && unzip -qo ~/Downloads/Android-Toolkit.zip -d /Applications
elif [[ "$USER_PLATFORM" == "Darwin x86_64" ]]
then
curl -sL https://github.com/anthonygress/Android-Toolkit/releases/latest/download/Android-Toolkit-x64.zip --output ~/Downloads/Android-Toolkit.zip && unzip -qo ~/Downloads/Android-Toolkit.zip -d /Applications
elif [[ "$OS" == "Linux" ]]
then
curl -sL https://github.com/anthonygress/Android-Toolkit/releases/latest/download/Android-Toolkit.AppImage --output ~/Desktop/Android-Toolkit.AppImage && chmod +x ~/Desktop/Android-Toolkit.AppImage
else
echo "OS not supported - please check the readme for install and support instructions"
exit 1
fi
}
install_adb() {
echo -e "\n---------------------- Installing ADB ----------------------"
if [[ "$OS" == "Darwin" ]]
then
curl -sL -o ~/Downloads/platform-tools-latest-darwin.zip https://dl.google.com/android/repository/platform-tools-latest-darwin.zip && unzip -qo ~/Downloads/platform-tools-latest-darwin.zip -d /Applications/"Android Toolkit.app"/Contents/
elif [[ "$OS" == "Linux" ]]
then
mkdir /usr/bin/Android-Toolkit
curl -sL -o ~/Downloads/platform-tools-latest-darwin.zip https://dl.google.com/android/repository/platform-tools-latest-linux.zip && unzip -qo ~/Downloads/platform-tools-latest-darwin.zip -d /usr/bin/Android-Toolkit
fi
}
cleanUp(){
echo -e "\n---------------------- Cleaning Up ----------------------"
rm ~/Downloads/platform-tools-latest-darwin.zip
if [[ "$OS" == "Darwin" ]]
then
rm ~/Downloads/Android-Toolkit.zip
fi
}
openApp(){
echo -e "\n---------------------- Opening App ----------------------"
if [[ "$OS" == "Darwin" ]]
then
open -a /Applications/"Android Toolkit.app"
elif [[ "$OS" == "Linux" ]]
then
cd ~/Desktop && ./Android-Toolkit.AppImage
fi
echo
}
#runtime
curl https://raw.githubusercontent.com/AnthonyGress/Android-Toolkit/main/assets/art.txt
install_app
sleep 2
install_adb
openApp
cleanUp