From 7a4b368786bfaa70f3e01b1d3e00ae7250ca351b Mon Sep 17 00:00:00 2001 From: poka Date: Thu, 24 Sep 2020 01:04:11 +0200 Subject: [PATCH] Move debug db files to debug db folder --- g1-stats.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/g1-stats.sh b/g1-stats.sh index b776d6d..20c4aef 100755 --- a/g1-stats.sh +++ b/g1-stats.sh @@ -23,22 +23,22 @@ echo -e "\n############# $day à $startTime #############\n" [[ -z $(which jq) || -z $(which bc) || -z $(which curl) ]] && sudo apt update && sudo apt install jq bc curl echo "Initialisation ..." if $debug; then - TXBLOCKS=$(cat $SCRIPTPATH/db/txblocs) - membresPubkeys=$(cat db/membresPubkeys) - udBlocs=$(cat db/udblocs) + TXBLOCKS=$(cat $SCRIPTPATH/db/debug/txblocs) + membresPubkeys=$(cat $SCRIPTPATH/db/debug/membresPubkeys) + udBlocs=$(cat $SCRIPTPATH/db/debug/udblocs) else TXBLOCKS=$(curl -s ${DUNITER}/blockchain/with/tx | jq '.result.blocks[]') + echo "TXBLOCKS OK" membresPubkeys=$(curl -s ${DUNITER}/wot/members | jq -r '.results[].pubkey') + echo "membresPubkeys OK" udBlocs=$(curl -s ${DUNITER}/blockchain/with/ud | jq '.result.blocks[]') + echo "udBlocs OK" fi TXBLOCKS=($(echo "$TXBLOCKS" | sort -hu | awk '{printf $1" "}')) unset 'TXBLOCKS[${#TXBLOCKS[@]}-1]' -echo "TXBLOCKS OK" -echo "membresPubkeys OK" nbrMembers=$(echo "$membresPubkeys" | wc -l) lastBloc=${TXBLOCKS[-1]} -echo "udBlocs OK" isWeb=$1 jsonFile="$SCRIPTPATH/db/daily.json"