not relaying empty branch

This commit is contained in:
fred 2022-11-19 19:07:27 +01:00
parent 179bd5bc5d
commit 26fee3977d
1 changed files with 6 additions and 1 deletions

View File

@ -85,10 +85,15 @@ while true; do
############# PUBLISH IPFSNODEID BALISE
# Clean Empty
du -b ~/.zen/tmp/${IPFSNODEID} > /tmp/du
while read branch; do [[ $branch =~ "4096" ]] && rmdir $(echo $branch | cut -f 2 -d ' '); done < /tmp/du
# Scan local cache
ls ~/.zen/tmp/${IPFSNODEID}/
BSIZE=$(du -b ~/.zen/tmp/${IPFSNODEID} | tail -n 1 | cut -f 1)
## Merge with actual online version
ipfs get -o ~/.zen/tmp/${IPFSNODEID} /ipns/${IPFSNODEID}/
NSIZE=$(du -b ~/.zen/tmp/${IPFSNODEID} | tail -n 1 | cut -f 1)
@ -100,7 +105,7 @@ while true; do
&& ipfs name publish --allow-offline /ipfs/$ROUTING
end=`date +%s`
echo '(*__*) MySwam Update ($BSIZE B) duration was '`expr $end - $start`' seconds.'
echo "(*__*) MySwam Update ($BSIZE B) duration was "`expr $end - $start`' seconds.'
) &