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_zblock | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'lib/_ak_zblock') diff --git a/lib/_ak_zblock b/lib/_ak_zblock index 6afacfc..48aa7b5 100755 --- a/lib/_ak_zblock +++ b/lib/_ak_zblock @@ -3,19 +3,16 @@ source $AK_LIBDIR/_ak_log source $AK_LIBDIR/_ak_script source $AK_LIBDIR/_ak_gpg source $AK_LIBDIR/_ak_html +source $AK_LIBDIR/_ak_ipfs -_ak_zblock_show(){ # _ak_zblock_show # ak-zblock [IPFS CID] # # Returns a JSON array representing the chain retrieved. # Logs messages to $LOGSFILE. +_ak_zblock_show(){ verify=1 - if [ ! -z "$1" ] && [ "$1" == "-h" ] || [ "$1" == "--help" ] - then - usage - exit - elif [ ! -z "$1" ] + if [ ! -z $1 ] && [ -n "$1" ] then echo $1 | grep -e 'Qm.\{44\}' >/dev/null if [ $? -ne 0 ] @@ -28,7 +25,6 @@ _ak_zblock_show(){ entrance="$(cat $AK_ZLATEST)" fi zblock=$entrance - # ak-enter -l 1 "$entrance" > "$AK_CACHEDIR/fzblocks/$entrance" # Check if $zblock exists as variable if [ ! -v $zblock ] then -- cgit v1.2.3