Skip to content

Instantly share code, notes, and snippets.

@Larusso
Created January 17, 2020 07:48
Show Gist options
  • Save Larusso/c2599f201ae35e0d436948ef4f5da8a2 to your computer and use it in GitHub Desktop.
Save Larusso/c2599f201ae35e0d436948ef4f5da8a2 to your computer and use it in GitHub Desktop.
#!/usr/bin/expect
set timeout -1;
spawn ./android_sdk/tools/bin/sdkmanager --update
spawn ./android_sdk/tools/bin/sdkmanager --install "platform-tools" "build-tools;26.0.3" "build-tools;27.0.3" "build-tools;28.0.3" "platforms;android-26" "platforms;android-27" "platforms;android-28" "extras;android;m2repository"
expect {
"Accept? (y/N):" { exp_send "y\r" ; exp_continue }
eof
}
spawn ./android_sdk/tools/bin/sdkmanager --licenses
expect {
"Review licenses that have not been accepted (y/N)?" { exp_send "y\r" ; exp_continue }
"Accept? (y/N):" { 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