Created
November 1, 2012 01:51
-
-
Save philosuke/3991127 to your computer and use it in GitHub Desktop.
Auto update android sdk with authentication proxy
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 | |
export PATH=$PATH:${ANDROID_SDK_PATH}/tools | |
USER="your proxy-user" | |
PASS="your proxy-password " | |
PROXY_HOST="your proxy-host" | |
PROXY_PORT="your proxy-port" | |
expect -c " | |
spawn android update sdk -u -s --proxy-host ${PROXY_HOST} --proxy-port ${PROXY_PORT} | |
while {1} { | |
expect { | |
\"Login:\" { | |
send \"${USER}\r\" | |
} | |
\"Password:\" { | |
send \"${PASS}\r\" | |
} | |
\"Workstation:\" { | |
send \"\r\" | |
} | |
\"Domain:\" { | |
send \"\r\" | |
} | |
\"Done.\" { | |
exit | |
} | |
} | |
} | |
" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment