protect from empty lid

This commit is contained in:
fred 2021-09-13 03:16:43 +02:00
parent 69f52be3b4
commit 18152cc009
1 changed files with 1 additions and 0 deletions

View File

@ -105,6 +105,7 @@ echo "SUB-SCRAPING lieu FROM /astroport/map/$lat.$lon/p4n/spot.json"
[ -d ~/.zen/ipfs/.$IPFSNODEID/astroport/map/p4n/lieu/$lid ] && lieu=$(cat $geodata | jq -r '.lieux[] | "\(.id),\(.latitude),\(.longitude),\(.hauteur_limite),\(.publique),\(.top_liste),\(.code),\(.validation_admin),\(.distance)"' | shuf | tail -n 1)
lid=$(echo "$lieu" | cut -d ',' -f 1)
[[ "$lid" == "" ]] && continue
code=$(echo "$lieu" | cut -d ',' -f 7)
if [[ $(which chromium) ]]; then