do not ask for gpg pw with --dry-run
authorKarl Berry <karl@freefriends.org>
Mon, 11 Jun 2012 00:07:44 +0000 (17:07 -0700)
committerKarl Berry <karl@freefriends.org>
Mon, 11 Jun 2012 00:07:44 +0000 (17:07 -0700)
ChangeLog
build-aux/gnupload

index a375827..e7eebc7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2012-06-10  Karl Berry  <karl@gnu.org>
 
+       * build-aux/gnupload: with --dry-run, do not ask for gpg pw.
+
        * build-aux/gnupload: implement --replace, ftp-upload protocol v1.2.
 
 2012-06-10  Bruce Korb  <bkorb@gnu.org>
index bedf159..186d2ad 100755 (executable)
@@ -249,11 +249,13 @@ unset passphrase
 # listings with their arguments...).
 # Remember this script runs with 'set -e', so if echo is not built-in
 # it will exit now.
-PATH=/empty echo -n "Enter GPG passphrase: "
-stty -echo
-read -r passphrase
-stty echo
-echo
+if $dry_run; then :; else
+  PATH=/empty echo -n "Enter GPG passphrase: "
+  stty -echo
+  read -r passphrase
+  stty echo
+  echo
+fi
 
 if test $# -ne 0; then
   for file