aboutsummaryrefslogtreecommitdiff
path: root/lib/_ak_config
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-07-04 18:36:54 +0300
committerkaotisk <kaotisk@arching-kaos.org>2024-07-04 18:36:54 +0300
commitc0dbfc8dc7cf7af278de1d233d87ffbe481ba704 (patch)
tree9037aef8094102626f387cec6d026793478fd53a /lib/_ak_config
parent2d04f1e16cd234b6ad82eff3c4cd6b09149ef4ec (diff)
downloadarching-kaos-tools-c0dbfc8dc7cf7af278de1d233d87ffbe481ba704.tar.gz
arching-kaos-tools-c0dbfc8dc7cf7af278de1d233d87ffbe481ba704.tar.bz2
arching-kaos-tools-c0dbfc8dc7cf7af278de1d233d87ffbe481ba704.zip
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
Diffstat (limited to 'lib/_ak_config')
-rwxr-xr-xlib/_ak_config15
1 files changed, 2 insertions, 13 deletions
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"