summaryrefslogtreecommitdiff
path: root/receive-key
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-06-01 10:14:32 +0200
committerErich Eckner <git@eckner.net>2017-06-01 10:14:32 +0200
commit5daa51c16e6c17da2429e29c13e5d4eaddaf6fb6 (patch)
tree168890562a27fc81655080ab1a62ac198058d55b /receive-key
downloadreceive-all-keys-5daa51c16e6c17da2429e29c13e5d4eaddaf6fb6.tar.xz
Initial commit
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