From 01ff1c0a97cd36e69e21bac0776bef21be7ae374 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Thu, 15 Jun 2023 19:47:29 +0300 Subject: Fixed script call and one bug --- bin/ak-calculate-size | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/ak-calculate-size b/bin/ak-calculate-size index 45fa5fa..63ae2f7 100755 --- a/bin/ak-calculate-size +++ b/bin/ak-calculate-size @@ -1,8 +1,13 @@ #!/bin/bash -extract-cids > to_stats +ak-extract-cids > to_stats sum=0 ; while IFS="" read -r p || [ -n "$p" ] do - num=$(ak-ipfs-block-stat $p | grep Size | sed -e 's/Size: //g') + if [ "$p" != "" ] + then + num=$(ak-ipfs-block-stat $p | grep Size | sed -e 's/Size: //g') + else + num=0 + fi sum=$(expr $sum + $num ) done < to_stats echo "Chain is : $sum bytes" -- cgit v1.2.3