From 851b6c77e8b8a04ed34cc7c14101d0d68069ebcc Mon Sep 17 00:00:00 2001 From: fred Date: Mon, 11 Apr 2022 12:14:31 +0200 Subject: [PATCH] reset history_qo-op.json & search already copied video in ~/.zen/bunkerbox/history_*.json --- crowdbunker.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crowdbunker.sh b/crowdbunker.sh index 6c9e4c3..91a2706 100755 --- a/crowdbunker.sh +++ b/crowdbunker.sh @@ -43,6 +43,12 @@ if [[ ! -f ~/.zen/bunkerbox/history_${hier}.json && -f ~/.zen/bunkerbox/homepage [[ "$(cat ~/.zen/tmp/calendar.json)" == "" ]] && echo "NO calendar.json FATAL ERROR" && exit 1 cp ~/.zen/tmp/calendar.json ~/.zen/bunkerbox/calendar.json + + # RESET IPNS HISTORY FILE ( reset history_qo-op.json ) + cp ${MY_PATH}/templates/data/history.json ~/.zen/bunkerbox/homepage/history.json + VROOT=$(ipfs add -rwHq ~/.zen/bunkerbox/homepage/* | tail -n 1) + echo "'qo-op' update with /ipfs/$VROOT" + ipfs name publish --key=qo-op /ipfs/$VROOT fi ## GET LATEST VIDEOS @@ -301,7 +307,7 @@ echo "########################################################################## echo "Chaine Vidéo 'qo-op' => $IPFSNGW/ipns/$IPNS" echo ##### NEW HOMEPAGE / NEW DYNAMIC DATA ###### HERE TIMESTAMPING IS OK - InHere=$(cat ~/.zen/bunkerbox/history_qo-op.json | jq .Videos[].link | grep $VUID) + InHere=$(cat ~/.zen/bunkerbox/history_*.json | jq .Videos[].link | grep $VUID) if [[ ! $InHere ]]; then echo "BunkerBOX - NOUVELLE VIDEO - Mise à jour homepage & dynamic history(s).json" mkdir -p ~/.zen/bunkerbox/homepage/