Last active
August 29, 2015 14:13
-
-
Save tobias-johansson/2d7d64a5807a02025562 to your computer and use it in GitHub Desktop.
Update android sdk tools on CI server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Dump list, for reference | |
# android list sdk -u -a -e | |
## No 'tag' for getting latest build tools, for some reason | |
BUILD_TOOLS_LATEST=$(android list sdk -u -a -e | grep 'build-tools-' | head -n 1 | cut -d' ' -f2) | |
## Run through expect to accept license | |
expect -c " | |
set timeout -1; | |
spawn android update sdk -u -a -t tool,platform-tool,$BUILD_TOOLS_LATEST,extra-google-m2repository,extra-android-m2repository; | |
expect { | |
\"Do you accept the license\" { exp_send \"y\r\" ; exp_continue } | |
eof | |
} | |
" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment