aboutsummaryrefslogtreecommitdiff
path: root/bin/ak-gpg
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ak-gpg')
-rwxr-xr-xbin/ak-gpg31
1 files changed, 26 insertions, 5 deletions
diff --git a/bin/ak-gpg b/bin/ak-gpg
index 2c8bbdc..3acfc0b 100755
--- a/bin/ak-gpg
+++ b/bin/ak-gpg
@@ -1,4 +1,22 @@
-#!/bin/bash
+#!/usr/bin/env bash
+###
+### arching-kaos-tools
+### Tools to interact and build an Arching Kaos Infochain
+### Copyright (C) 2021 - 2025 kaotisk
+###
+### This program is free software: you can redistribute it and/or modify
+### it under the terms of the GNU General Public License as published by
+### the Free Software Foundation, either version 3 of the License, or
+### (at your option) any later version.
+###
+### This program is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with this program. If not, see <http://www.gnu.org/licenses/>.
+###
##
## It is a minimal wrapper aroung lib/_ak_gpg.
##
@@ -26,15 +44,17 @@
## -d, --delete-key Delete GPG keys from your keyring
## -ds, --delete-secret-key <fingerprint>
## Delete GPG keys from your keyring
+## -r, --run Runs a command with gpg2
##
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
+source $AK_LIBDIR/_ak_lib_load
+_ak_lib_load _ak_log
+_ak_lib_load _ak_script
+_ak_lib_load _ak_gpg
@@ -45,7 +65,7 @@ if [ ! -z $1 ]; then
--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;;
+ --get-key-fingerprint-from-ipfs) shift; _ak_gpg_key_get_fingerprint_from_ipfs $1; exit;;
--export-key-self-to-file) _ak_gpg_key_self_export 'self.pub'; exit;;
--clear-sign) shift; _ak_gpg_sign_clear "$2" "$1"; exit;;
--verify-file) shift; _ak_gpg_verify_clear_signature "$1"; exit;;
@@ -59,6 +79,7 @@ if [ ! -z $1 ]; then
--select-key | -s) _ak_gpg_select_key; exit;;
--delete-key | -d) _ak_gpg_delete_key; exit;;
--delete-secret-key | -ds) shift; _ak_gpg_delete_secret_key $1; exit;;
+ --run | -r) shift; _ak_gpg $*; exit;;
* ) _ak_usage;;
esac
else _ak_usage