summaryrefslogtreecommitdiff
path: root/receive-key
diff options
context:
space:
mode:
Diffstat (limited to 'receive-key')
-rwxr-xr-xreceive-key11
1 files changed, 11 insertions, 0 deletions
diff --git a/receive-key b/receive-key
new file mode 100755
index 0000000..c777bb6
--- /dev/null
+++ b/receive-key
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+keyIDs="$(
+ gpg --batch --with-colons --search-keys "$1" 2> /dev/null | \
+ grep '^pub:' | \
+ cut -d: -f2
+)"
+
+if [ -n "${keyIDs}" ]; then
+ gpg --recv-keys ${keyIDs}
+fi