-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathandroid-development.sh
More file actions
executable file
·33 lines (24 loc) · 1016 Bytes
/
android-development.sh
File metadata and controls
executable file
·33 lines (24 loc) · 1016 Bytes
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
#!/bin/sh
# Android Development Environment
# Exit immediately if a command exits with a non-zero status
set -e
# Store a local variable of the scripts current directory
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if ! command -v "brew" > /dev/null 2>&1; then
echo "==> Homebrew not found. Installing now..."
${DIR}/brew.sh
fi
if command -v "brew" > /dev/null 2>&1; then
echo "==> Installing Android development environment..."
brew cask install android-studio
echo 'export PATH=$PATH:$HOME/Library/Android/sdk/platform-tools/' >> ~/.bash_profile
echo 'export PATH=$PATH:$HOME/Library/Android/sdk/tools/' >> ~/.bash_profile
echo '\n' >> ~/.bash_profile
echo 'export PATH=$PATH:$HOME/Library/Android/sdk/platform-tools/' >> ~/.zshenv
echo 'export PATH=$PATH:$HOME/Library/Android/sdk/tools/' >> ~/.zshenv
echo '\n' >> ~/.zshenv
echo "==> Android development environment installed."
else
echo "==> Homebrew not found. Aborting..."
exit 1
fi