pffff
This commit is contained in:
parent
855d2877f5
commit
3eddcad0eb
16
API/ZONE.sh
16
API/ZONE.sh
|
@ -76,11 +76,11 @@ LAT=$LAT LON=$LON SLAT=$SLAT SLON=$SLON RLAT=$RLAT RLON=$RLON"
|
|||
SECTOR="_${SLAT}_${SLON}"
|
||||
echo "SECTOR = ${SECTOR}"
|
||||
ZONEINDEX=$SECTORIPNS
|
||||
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_${SLAT}_${SLON}/_*_*/SECTORNS | tail -n 1)
|
||||
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_${SLAT}_${SLON}/_*_*/SECTORNS | tail -n 1)
|
||||
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_${SLAT}*_${SLON}*/_*_*/SECTORNS | tail -n 1)
|
||||
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_${SLAT}*_${SLON}*/_*_*/SECTORNS | tail -n 1)
|
||||
ZONEG1PUB=$SECTORG1PUB
|
||||
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_${SLAT}_${SLON}/_*_*/SECTORG1PUB | tail -n 1)
|
||||
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_${SLAT}_${SLON}/_*_*/SECTORG1PUB | tail -n 1)
|
||||
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_${SLAT}*_${SLON}*/_*_*/SECTORG1PUB | tail -n 1)
|
||||
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_${SLAT}*_${SLON}*/_*_*/SECTORG1PUB | tail -n 1)
|
||||
LAT=${SLAT}
|
||||
LON=${SLON}
|
||||
JSON="ZONE${SECTOR}_${DEG}.json"
|
||||
|
@ -95,11 +95,11 @@ LAT=$LAT LON=$LON SLAT=$SLAT SLON=$SLON RLAT=$RLAT RLON=$RLON"
|
|||
REGION="_${RLAT}_${RLON}"
|
||||
echo "REGION = ${REGION}"
|
||||
ZONEINDEX=$REGIONIPNS
|
||||
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}_${RLON}/_*_*/_*_*/REGIONNS | tail -n 1)
|
||||
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_*_*/_*_*/REGIONNS | tail -n 1)
|
||||
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}*_${RLON}*/_*_*/_*_*/REGIONNS | tail -n 1)
|
||||
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}*_${RLON}*/_*_*/_*_*/REGIONNS | tail -n 1)
|
||||
ZONEG1PUB=$REGIONG1PUB
|
||||
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}_${RLON}/_*_*/_*_*/REGIONG1PUB | tail -n 1)
|
||||
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/_${RLAT}_${RLON}/_*_*/_*_*/REGIONG1PUB | tail -n 1)
|
||||
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}*_${RLON}*/_*_*/_*_*/REGIONG1PUB | tail -n 1)
|
||||
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/_${RLAT}*_${RLON}*/_*_*/_*_*/REGIONG1PUB | tail -n 1)
|
||||
LAT=${RLAT}
|
||||
LON=${RLON}
|
||||
JSON="ZONE${REGION}_${DEG}.json"
|
||||
|
|
|
@ -67,7 +67,7 @@ while read JSONUPLANET; do
|
|||
|
||||
echo "JSONUPLANET=${JSONUPLANET}"
|
||||
|
||||
UPNAME=$(echo ${JSONUPLANET} | jq .title) # What name is given ?
|
||||
UPNAME=$(echo ${JSONUPLANET} | jq -r ".title") # What name is given ?
|
||||
[[ "${UPNAME}" == "null" || "${UPNAME}" == "" ]] && echo "FATAL ERROR UPNAME .title MISSING" && exit 1
|
||||
HASH=$(echo ${JSONUPLANET} | jq -r ".hash") ## What text hash it has ?
|
||||
[[ "${HASH}" == "null" || "${HASH}" == "" ]] && echo "FATAL ERROR UPNAME .hash MISSING" && exit 1
|
||||
|
|
Loading…
Reference in New Issue