Add simple tool to sign all keys in a keyring
authorWerner Koch <wk@gnupg.org>
Mon, 14 Oct 2002 14:14:31 +0000 (14:14 +0000)
committerWerner Koch <wk@gnupg.org>
Mon, 14 Oct 2002 14:14:31 +0000 (14:14 +0000)
tools/signmany [new file with mode: 0644]

diff --git a/tools/signmany b/tools/signmany
new file mode 100644 (file)
index 0000000..9b453d4
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+if [ ! -f ./$1 ]; then
+   echo "usage: signmany keyring" >&2
+   exit 1
+fi
+
+
+ro="--trustdb-name=./tdb.tmp --no-default-keyring --secret-keyring /floppy/secring.gpg --keyring ./$1"
+
+kis=`gpg $ro --fast-list-mode --list-keys --with-colons \
+     | awk -F: '$1=="pub" { print $5 }'`
+
+for k in $kis; do
+    echo "Keyid: $k"
+    answer=A
+    while [ "$answer" = "A" ]; do
+        gpg $ro --lock-never --sign-key $k
+        answer=""
+        while [ "$answer" = "" ]; do
+           read -p 'Okay, Again or Quit? (O/A/Q) '
+           case "$REPLY" in
+              o|O) answer=O ;;
+              a|A) answer=A ;;
+              q|Q) answer=Q ;;
+              *) ;;
+           esac
+        done
+    done
+    [ "$answer" = "Q" ] && break
+done
+
+