From 3210b8c0dce126f75631786aa73c998b5e72ea82 Mon Sep 17 00:00:00 2001 From: James Laska Date: Mon, 7 Sep 2015 20:33:08 -0400 Subject: [PATCH] Add helper script to sign using expect --- tools/scripts/sign.exp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 tools/scripts/sign.exp diff --git a/tools/scripts/sign.exp b/tools/scripts/sign.exp new file mode 100755 index 0000000000..d85d77d77e --- /dev/null +++ b/tools/scripts/sign.exp @@ -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 { } +}