Created
August 19, 2022 12:33
-
-
Save BCadet/f4f564baf2829406fbead336fa594a54 to your computer and use it in GitHub Desktop.
auto generate xilinx authentication token with expect
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
#!/usr/bin/expect | |
set installer [lindex $argv 0] | |
set email [lindex $argv 1] | |
set password [lindex $argv 2] | |
spawn $installer -b AuthTokenGen | |
set timeout -1 | |
set ret 0 | |
expect { | |
"E-mail Address:" { send "$email\r"; exp_continue} | |
"Password:" {send "$password\r"; exp_continue} | |
"Saved authentication token file successfully" {} | |
"Authentication error" { set ret 1; } | |
} | |
exit $ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment