summaryrefslogtreecommitdiff
path: root/get-signers
diff options
context:
space:
mode:
Diffstat (limited to 'get-signers')
-rwxr-xr-xget-signers16
1 files changed, 13 insertions, 3 deletions
diff --git a/get-signers b/get-signers
index 1831686..e9ea32f 100755
--- a/get-signers
+++ b/get-signers
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
usage()
{
@@ -31,12 +31,22 @@ if [ "$#" -eq 0 ]; then
exit 1
fi
+tmpdir=`mktemp -d`
+trap "rm -rf '$tmpdir'" EXIT
+
keys="$*"
gpg --recv-keys $keys
while [ "$depth" -gt 0 ]; do
-
keys=$(gpg --with-colons --fast-list-mode --list-sigs $keys | awk -F ':' '$1 ~ /sig|rev/ {print $5}' | sort -u)
- gpg --recv-keys $keys
+ recv=""
+ for k in $keys; do
+ if ! [ -e "$tmpdir/$k" ]; then
+ recv="$recv $k"
+ touch "$tmpdir/$k"
+ fi
+ done
+
+ gpg --recv-keys $recv
depth=$((depth - 1))
done