This spot.json is managed by $geosrc

This commit is contained in:
fred 2021-09-20 23:50:53 +02:00
parent 8661212506
commit 2a4eeb914a
1 changed files with 4 additions and 2 deletions

View File

@ -88,11 +88,13 @@ fi
##############################################################"
## GEODATA. continue. Let's extract lieu pdf from my spot
##############################################################"
geodata=$(ls ~/.zen/{ipfs,ipfs_swarm}/.*/astroport/map/$lat.$lon/p4n/spot.json 2>/dev/null | tail -n 1)
geosrc=$(ls ~/.zen/{ipfs,ipfs_swarm}/.*/astroport/map/$lat.$lon/p4n/spot.json 2>/dev/null)
geodata=$(echo "$geosrc" | tail -n 1)
ipfsnodeid=$(echo "$geodata" | cut -d '/' -f 6 | cut -d '.' -f 2)
if [[ "$ipfsnodeid" != "$IPFSNODEID" ]]; then
echo "This spot.json is already managed by $ipfsnodeid"
echo "This spot.json is managed by
$geosrc"
echo "getting geodata from one of mine"
geodata=$(ls ~/.zen/ipfs/.*/astroport/map/*.*/p4n/spot.json | shuf | tail -n 1)
fi