diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-02-28 07:03:37 +0200 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-02-28 07:03:37 +0200 |
commit | 9c249804a4555793532b7ee3eb2d501c2f328cb9 (patch) | |
tree | 47f8ef5420d5fe1421967040cff0f22c0411afb7 | |
parent | 75c0f9508816bc8f4ca80cc60e5cf84e38927bc1 (diff) | |
download | arching-kaos-tools-9c249804a4555793532b7ee3eb2d501c2f328cb9.tar.gz arching-kaos-tools-9c249804a4555793532b7ee3eb2d501c2f328cb9.tar.bz2 arching-kaos-tools-9c249804a4555793532b7ee3eb2d501c2f328cb9.zip |
Extracts fingerprint from IPFS CID holding a public GPG key
-rwxr-xr-x | bin/ak-get-gpg-fingerprint | 10 |
1 files changed, 10 insertions, 0 deletions
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 + |