mirror of
https://github.com/ansible/awx.git
synced 2026-05-20 15:27:47 -02:30
Improvements to the package signing script
This commit is contained in:
@@ -4,15 +4,33 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
set timeout 600
|
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 command [join $argv]
|
||||||
set passphrase $env(PASSPHRASE)
|
|
||||||
puts "# $command"
|
if { [info exists env(PASSPHRASE) ] } {
|
||||||
spawn -noecho {*}$command
|
set passphrase $env(PASSPHRASE)
|
||||||
|
} else {
|
||||||
|
set passphrase ""
|
||||||
|
}
|
||||||
|
|
||||||
|
# Run the desired command
|
||||||
|
spawn {*}$command
|
||||||
expect {
|
expect {
|
||||||
-exact -nocase "enter passphrase: " {
|
-exact -nocase "enter passphrase: " {
|
||||||
send -- "$passphrase\r"
|
send -- "$passphrase\r"
|
||||||
exp_continue
|
exp_continue
|
||||||
}
|
}
|
||||||
|
timeout {
|
||||||
|
puts "[error] expect timeout"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
eof { }
|
eof { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user