mirror of
https://github.com/ansible/awx.git
synced 2026-01-10 15:32:07 -03:30
Improvements to the package signing script
This commit is contained in:
parent
99444f2737
commit
3a914619ce
@ -4,15 +4,33 @@
|
||||
#
|
||||
|
||||
set timeout 600
|
||||
|
||||
# Optionally print usage message
|
||||
if {[llength $argv] <= 0} {
|
||||
puts "Usage: sign.exp <command>"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Process arguments
|
||||
set command [join $argv]
|
||||
set passphrase $env(PASSPHRASE)
|
||||
puts "# $command"
|
||||
spawn -noecho {*}$command
|
||||
|
||||
if { [info exists env(PASSPHRASE) ] } {
|
||||
set passphrase $env(PASSPHRASE)
|
||||
} else {
|
||||
set passphrase ""
|
||||
}
|
||||
|
||||
# Run the desired command
|
||||
spawn {*}$command
|
||||
expect {
|
||||
-exact -nocase "enter passphrase: " {
|
||||
send -- "$passphrase\r"
|
||||
exp_continue
|
||||
}
|
||||
timeout {
|
||||
puts "[error] expect timeout"
|
||||
exit 1
|
||||
}
|
||||
eof { }
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user