diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-07-04 18:36:54 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-07-04 18:36:54 +0300 |
commit | c0dbfc8dc7cf7af278de1d233d87ffbe481ba704 (patch) | |
tree | 9037aef8094102626f387cec6d026793478fd53a /lib/_ak_zblock | |
parent | 2d04f1e16cd234b6ad82eff3c4cd6b09149ef4ec (diff) | |
download | arching-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_zblock')
-rwxr-xr-x | lib/_ak_zblock | 10 |
1 files changed, 3 insertions, 7 deletions
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 |