blob: 5ff9e6ed0962276eaf20aa619be43b35c709a431 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#!/bin/bash
##
## It is a minimal wrapper aroung lib/_ak_gpg.
##
## Usage:
##
## -h, --help Prints this help message
##
## --get-key-self-as-ipfs Returns your key as an IPFS hash
##
## --get-key-self-as-fingerprint Returns the fingerprint of your key
##
## --get-key-fingerprint-from-ipfs Returns the fingerprint of a given key
##
fullprogrampath="$(realpath $0)"
PROGRAM=$(basename $0)
descriptionString="GPG cli tool"
# At least these
source $AK_LIBDIR/_ak_log
source $AK_LIBDIR/_ak_script
source $AK_LIBDIR/_ak_gpg
# Flags to run
if [ ! -z $1 ]; then
case $1 in
-h | --help) _ak_usage; exit;;
--example) example; exit;;
--get-key-self-as-ipfs) _ak_gpg_key_self_get_fingerprint_from_config; exit;;
--get-key-self-as-fingerprint) _ak_gpg_key_self_get_fingerprint; exit;;
--get-key-fingerprint-from-ipfs) _ak_gpg_key_get_fingerprint_from_ipfs $1; exit;;
* ) _ak_usage;;
esac
else _ak_usage
fi
|