Skip to content

Instantly share code, notes, and snippets.

@stefanhoth
Forked from berndsi/setup-android-sdk.bash
Created March 14, 2016 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefanhoth/aee73672ef89e3401a92 to your computer and use it in GitHub Desktop.
Save stefanhoth/aee73672ef89e3401a92 to your computer and use it in GitHub Desktop.
SDK_HOME_PATH="$HOME"
SDK_PATH="$SDK_HOME_PATH/android-sdk-linux"
# Needs to be updated when new releases are made
SDK_DOWNLOAD_URL="http://dl.google.com/android/android-sdk_r22.6.2-linux.tgz"
curl --location $SDK_DOWNLOAD_URL | tar -xz -C $SDK_HOME_PATH
# Just install platform-tools, build-tools & Android-19
# Filter names are from `android list sdk -e -a`
expect -c "
set timeout -1;
spawn $SDK_PATH/tools/android update sdk -u --filter "platform-tools,build-tools-19.1.0,android-19"
expect {
\"Do you accept the license\" { exp_send \"y\r\"; exp_continue }
eof
}
"
@stefanhoth
Copy link
Author

Because I always forget how to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment