Skip to content

Instantly share code, notes, and snippets.

@mattak
Last active August 29, 2015 13: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 mattak/9804107 to your computer and use it in GitHub Desktop.
Save mattak/9804107 to your computer and use it in GitHub Desktop.
type 'y' when update android sdk. usage : expect-android-update.sh sysimg-19
#!/bin/bash
OPTIONS="--no-ui --all --filter"
expect -c "
set timeout -1
spawn android update sdk $OPTIONS $@
expect {
\"Do you accept the license\" {
send \"y\n\"
exp_continue
}
Downloading {
exp_continue
}
Installing {
exp_continue
}
}
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment