From 6358b59dc6416da13c3cc9ae5e3a32ec41f6b87a Mon Sep 17 00:00:00 2001 From: kaotisk Date: Sat, 20 Jul 2024 17:22:41 +0300 Subject: Minimized 'ak' usage in the scripts in favor of functions --- lib/_ak_zchain | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lib/_ak_zchain') diff --git a/lib/_ak_zchain b/lib/_ak_zchain index c809b5d..dd9400c 100755 --- a/lib/_ak_zchain +++ b/lib/_ak_zchain @@ -81,18 +81,18 @@ _ak_zchain_rebase(){ _ak_zchain_extract_cids(){ if [ ! -z $1 ] && [ -n "$1" ] then - ak zchain --crawl $1 | jq -M | grep Qm | sed -e 's/".*"://g; s/ //g; s/[{,"]//g' | sort | uniq + _ak_zchain_crawl $1 | jq -M | grep Qm | sed -e 's/".*"://g; s/ //g; s/[{,"]//g' | sort | uniq else - ak zchain --crawl | jq -M | grep Qm | sed -e 's/".*"://g; s/ //g; s/[{,"]//g' | sort | uniq + _ak_zchain_crawl | jq -M | grep Qm | sed -e 's/".*"://g; s/ //g; s/[{,"]//g' | sort | uniq fi } _ak_zchain_extract_data_cids(){ if [ ! -z $1 ] then - ak zchain --crawl $1 | jq | grep ipfs | awk '{print $2}' | sed -e 's/"//g;s/,//g' + _ak_zchain_crawl $1 | jq | grep ipfs | awk '{print $2}' | sed -e 's/"//g;s/,//g' else - ak zchain --crawl | jq | grep ipfs | awk '{print $2}' | sed -e 's/"//g;s/,//g' + _ak_zchain_crawl | jq | grep ipfs | awk '{print $2}' | sed -e 's/"//g;s/,//g' fi } @@ -223,12 +223,10 @@ _ak_zchain_crawl_self(){ _ak_zchain_crawl_remote_ipfs(){ _ak_zchain_crawl $1 - #ak enter $1 } _ak_zchain_crawl_remote_ipns(){ _ak_zchain_crawl -n $1 - #ak enter -n $1 } _ak_zchain_get_latest(){ -- cgit v1.2.3