From c0dbfc8dc7cf7af278de1d233d87ffbe481ba704 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Thu, 4 Jul 2024 18:36:54 +0300 Subject: Refactoring + bug fixes - Recursive sourcing was introduced and fixed - Almost finished removing old style commands 'ak-zchain-chk' in favor of the new design (eg 'ak zchain --check') - A couple of changes on how we really do concatenation of an IPFS link - Interface function for publishing to 'ak-config' key - Interface function for publishing to IPNS keys --- lib/_ak_config | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'lib/_ak_config') diff --git a/lib/_ak_config b/lib/_ak_config index c362178..0159453 100755 --- a/lib/_ak_config +++ b/lib/_ak_config @@ -1,13 +1,6 @@ #!/bin/bash - -source $AK_LIBDIR/_ak_gpg -source $AK_LIBDIR/_ak_ipfs source $AK_LIBDIR/_ak_node -_ak_config_get_ipns_key(){ - _ak_ipfs_key_list_full | grep 'ak-config' | cut -d ' ' -f 1 -} - _ak_config_show(){ # We will be using our public key also to put it in the block later KEY="tmp-gpg.pub" @@ -28,12 +21,8 @@ _ak_config_show(){ _ak_config_publish(){ _ak_config_show | jq -c -M > tmpfile - _ak_ipfs key list | grep ak-config 2> /dev/null 1>&2 - if [ $? -ne 0 ] - then - _ak_ipfs_key_gen ak-config - fi - _ak_ipfs_name_publish --key=ak-config /ipfs/$(_ak_ipfs_add tmpfile) + ipfs_hash="$(_ak_ipfs_add tmpfile)" + _ak_ipfs_config_publish $ipfs_hash if [ $? != 0 ] then echo -e "\033[0;34mError on publishing\033[0;0m\nYour information:\n" -- cgit v1.2.3