From 9c249804a4555793532b7ee3eb2d501c2f328cb9 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Wed, 28 Feb 2024 07:03:37 +0200 Subject: Extracts fingerprint from IPFS CID holding a public GPG key --- bin/ak-get-gpg-fingerprint | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 bin/ak-get-gpg-fingerprint (limited to 'bin') diff --git a/bin/ak-get-gpg-fingerprint b/bin/ak-get-gpg-fingerprint new file mode 100755 index 0000000..34bc4e8 --- /dev/null +++ b/bin/ak-get-gpg-fingerprint @@ -0,0 +1,10 @@ +#!/bin/bash +if [ -z $1 ] +then + gpg2 --fingerprint $(ak-ipfs-cat $(ak-get-gpg) | gpg2 --import 2>&1 | head -n 1 | cut -d ' ' -f 3 | sed 's/://') | head -n 2 | tail -n 1 | sed 's/ //g' +elif [ -n "$1" ] +then + gpg2 --fingerprint $(ak-ipfs-cat "$1" | gpg2 --import 2>&1 | head -n 1 | cut -d ' ' -f 3 | sed 's/://') | head -n 2 | tail -n 1 | sed 's/ //g' + +fi + -- cgit v1.2.3