Add helper script to sign using expect

This commit is contained in:
James Laska 2015-09-07 20:33:08 -04:00
parent 8e603dc18d
commit 3210b8c0dc

17
tools/scripts/sign.exp Executable file
View File

@ -0,0 +1,17 @@
#!/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 "Enter passphrase: " {
send -- "$passphrase\r"
exp_continue
}
eof { }
}