Skip to content

Instantly share code, notes, and snippets.

@BCadet
Created August 19, 2022 12:33
Show Gist options
  • Save BCadet/f4f564baf2829406fbead336fa594a54 to your computer and use it in GitHub Desktop.
Save BCadet/f4f564baf2829406fbead336fa594a54 to your computer and use it in GitHub Desktop.
auto generate xilinx authentication token with expect
#!/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