dot

packages and services management
Log | Files | Refs | README

commit 15cc487035c93e623fd5b127bf769d9d6e8324e5
parent 961a2c12f3d7398b7ead1aa0e72859ab41a5fb29
Author: Josuah Demangeon <mail@josuah.net>
Date:   Wed,  3 Oct 2018 00:00:21 +0200

export armored PGP keys with nothing more than base64, sh, printf

Diffstat:
Abin/netpgparmor | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/bin/netpgparmor b/bin/netpgparmor @@ -0,0 +1,9 @@ +#!/bin/sh -e + +test $# -gt 0 || set -- "$HOME/.gnupg/pubring.gpg" +test $# -eq 1 || { echo "usage: $0 [path-to-pgp-key]"; exit 1; } +ls "$1" >/dev/null + +printf -- '-----BEGIN PGP PUBLIC KEY BLOCK-----\n' +base64 "$1" +printf -- '-----END PGP PUBLIC KEY BLOCK-----\n'