forked from AtomicGameEngine/AtomicGameEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup
More file actions
30 lines (25 loc) · 996 Bytes
/
setup
File metadata and controls
30 lines (25 loc) · 996 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
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
brew update
# TODO: Ensure both Brew and Caskroom are set up.
if [ "$(which java)" == "" ]; then
echo "ERROR: Install JDK first. Maybe use 'brew cask install java'. Leaving this to you in case you want to handle this differently."
exit 1
fi
if [ "$(which ant)" == "" ]; then brew install ant; fi
if [ "$(which mvn)" == "" ]; then brew install maven; fi
if [ "$(which android)" == "" ]; then
if [ ! -e "$(brew --prefix android-sdk)" ]; then
brew install android-sdk
else
brew link android-sdk
fi
fi
ANDROID_HOME=$(brew --prefix android-sdk)
export ANDROID_HOME
echo y | android update sdk --all --no-ui --filter 'tools,platform-tools'
echo y | android update sdk --all --no-ui --filter 'android-23'
echo y | android update sdk --all --no-ui --filter 'build-tools-23.0.2'
echo y | android update sdk --all --no-ui --filter 'extra-google-m2repository'
echo y | android update sdk --all --no-ui --filter 'extra-android-m2repository'