Skip to content

Instantly share code, notes, and snippets.

@vgaidarji
Created May 31, 2017 16:39
Show Gist options
  • Save vgaidarji/d0673e9a7713fcd8229a08be9e0838bd to your computer and use it in GitHub Desktop.
Save vgaidarji/d0673e9a7713fcd8229a08be9e0838bd to your computer and use it in GitHub Desktop.
Update Android sdkmanager licenses automatically
#!/bin/bash
/usr/bin/expect -c '
set timeout -1;
spawn '"${ANDROID_HOME}"'/tools/bin/sdkmanager --licenses;
expect {
"y/N" { exp_send "y\r" ; exp_continue }
eof
}
'
@wuyinggui
Copy link

why not "echo 'y' | ${ANDROID_HOME}/tools/bin/sdkmanager --licenses"

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