diff options
author | lassulus <git@lassul.us> | 2023-04-15 16:03:51 +0200 |
---|---|---|
committer | lassulus <git@lassul.us> | 2023-04-15 17:01:36 +0200 |
commit | 7214a7658fb343f29622fc0b89ba8aaad8b51bf8 (patch) | |
tree | 5ea52240c8cbd5b2c6a57d748099a2560f99223f /kartei | |
parent | e6ef361bb9b984ccee138c290244e925f97e2907 (diff) |
kartei: add trust-gpg script
Diffstat (limited to 'kartei')
-rwxr-xr-x | kartei/trust-gpg.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/kartei/trust-gpg.sh b/kartei/trust-gpg.sh new file mode 100755 index 000000000..84b67aeb4 --- /dev/null +++ b/kartei/trust-gpg.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# usage: $0 +set -eu +WD=$(dirname "$(realpath "$0")") +PUBKEYS= +for key in "$WD"/kmein/kmein.gpg "$WD"/lass/pgp/* "$WD"/makefu/pgp/* "$WD"/tv/pgp/*; do + echo "$key" >&2 + keyid=$(gpg --with-colons --fingerprint --import-options show-only --import "$key" | grep fpr | cut -d : -f 10 | head -1) + gpg --import "$key" >&2 + printf '5\ny\n' | gpg --command-fd 0 --expert --edit-key "$keyid" trust >&2 + PUBKEYS="${PUBKEYS}${keyid}\n" +done +printf "$PUBKEYS" |