mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 23:51:09 +03:00
1b6b622d70
Handles the multiple prompts from debuild and reprepro, each with different cases.
27 lines
497 B
Plaintext
Executable File
27 lines
497 B
Plaintext
Executable File
#!/usr/bin/expect -f
|
|
#
|
|
# Helper script to respond to passphrase prompts from the gpg command.
|
|
#
|
|
|
|
set timeout 600
|
|
set command [join $argv]
|
|
set passphrase $env(PASSPHRASE)
|
|
puts "# $command"
|
|
spawn -noecho {*}$command
|
|
expect {
|
|
-exact -nocase "enter passphrase: " {
|
|
send -- "$passphrase\r"
|
|
exp_continue
|
|
}
|
|
eof { }
|
|
}
|
|
|
|
lassign [wait] pid spawnid os_error_flag retval
|
|
|
|
if {$os_error_flag == 0} {
|
|
puts "exit status: $retval"
|
|
} else {
|
|
puts "errno: $retval"
|
|
}
|
|
exit $retval
|