diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-07-20 17:22:41 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-07-20 17:22:41 +0300 |
commit | 6358b59dc6416da13c3cc9ae5e3a32ec41f6b87a (patch) | |
tree | 85e67082a2ad80ac3d92bb7360984273f1060f57 /lib | |
parent | 8667152bc05967c2a9b19a80d809c81caec0a4df (diff) | |
download | arching-kaos-tools-6358b59dc6416da13c3cc9ae5e3a32ec41f6b87a.tar.gz arching-kaos-tools-6358b59dc6416da13c3cc9ae5e3a32ec41f6b87a.tar.bz2 arching-kaos-tools-6358b59dc6416da13c3cc9ae5e3a32ec41f6b87a.zip |
Minimized 'ak' usage in the scripts in favor of functions
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/_ak_zchain | 10 |
1 files changed, 4 insertions, 6 deletions
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(){ |