buggy for, better while read

This commit is contained in:
fred 2022-11-16 16:22:58 +01:00
parent 89b43dbd09
commit 302eb5cbfc
1 changed files with 4 additions and 2 deletions

View File

@ -35,7 +35,8 @@ tiddlywiki --load ${INDEX} --output ~/.zen/tmp --render '.' 'voeu.json' 'text/pl
[[ ! -s ~/.zen/tmp/voeu.json ]] && echo "AUCUN VOEU - EXIT -" && 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')"
cat ~/.zen/tmp/voeu.json | jq -r '.[].title' > ~/.zen/tmp/$PLAYER.voeux.create.list
while read VOEU;
do
[[ ! $VOEU ]] && echo "AUCUN VOEU" && continue
echo "NOUVEAU $VOEU"
@ -44,5 +45,6 @@ do
echo "CREATION G1Voeu G1$VOEU"
~/.zen/Astroport.ONE/ASTROBOT/G1Voeu.sh "$VOEU" "$PLAYER" "$INDEX"
done
done < ~/.zen/tmp/$PLAYER.voeux.create.list
exit 0