summaryrefslogtreecommitdiff
path: root/receive-key
blob: c777bb64bc11ce4a1c1a957facf1eaf7b9a00d2f (plain)
1
2
3
4
5
6
7
8
9
10
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