From 1adccc89da917efeec10972bcc7cd3245bf11b75 Mon Sep 17 00:00:00 2001 From: fred Date: Mon, 10 Oct 2022 18:52:53 +0200 Subject: [PATCH] empty file protection --- ASTROBOT/VOEUX.create.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ASTROBOT/VOEUX.create.sh b/ASTROBOT/VOEUX.create.sh index c47d00541..0d3a16683 100755 --- a/ASTROBOT/VOEUX.create.sh +++ b/ASTROBOT/VOEUX.create.sh @@ -25,6 +25,7 @@ myIP=$(hostname -I | awk '{print $1}' | head -n 1) rm -f ~/.zen/tmp/voeu.json tiddlywiki --verbose --load ${INDEX} --output ~/.zen/tmp --render '.' 'voeu.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[tag[voeu]]' +[[ !-s ~/.zen/tmp/voeu.json ]] && echo "Aucun Tiddler avec le tag voeu..." && exit 0 ## Tous les tiddlers comportant le tag "voeu" lancent la création d'un G1VOEU ayant le titre du Voeu comme génrateur de clef TW (pepper). for VOEU in $(cat ~/.zen/tmp/voeu.json | jq -r '.[].title') do @@ -34,5 +35,4 @@ do echo "Creating G1$VOEU TW" ~/.zen/Astroport.ONE/G1VOEUX.sh "$VOEU" "$PLAYER" "$INDEX" - done