From 157813f9036877b879d86f9d6c9f7856a0af2ff1 Mon Sep 17 00:00:00 2001 From: fred Date: Thu, 25 Aug 2022 19:38:58 +0200 Subject: [PATCH] more is better --- start.sh | 1 + tools/PLAYER.refresh.sh | 4 ++++ tools/VOEUX.refresh.sh | 7 ++----- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/start.sh b/start.sh index ba95f470..43ecc367 100755 --- a/start.sh +++ b/start.sh @@ -127,6 +127,7 @@ select fav in "${choices[@]}"; do "IMPRIMER VOEU") PS3='Choisissez un de vos voeux ___ ' voeux=($(ls ~/.zen/game/players/$PLAYER/voeux 2>/dev/null)) + select voeu in "${voeux[@]}"; do case $voeu in *) echo "IMPRESSION $voeu" diff --git a/tools/PLAYER.refresh.sh b/tools/PLAYER.refresh.sh index 2710ee20..02639d41 100755 --- a/tools/PLAYER.refresh.sh +++ b/tools/PLAYER.refresh.sh @@ -27,10 +27,14 @@ for PLAYER in $(ls ~/.zen/game/players/); do ipfs --timeout 12s cat /ipns/$ASTRONAUTENS > ~/.zen/tmp/astro/index.html + if [ ! -s ~/.zen/tmp/astro/index.html ]; then echo "ERROR IPNS TIMEOUT. Unchanged local backup..." continue else + ## Replace tube links with downloaded video + $MY_PATH/TUBE.copy.sh ~/.zen/tmp/astro/index.html $PLAYER + echo "Upgrade TW local copy..." cp ~/.zen/tmp/astro/index.html ~/.zen/game/players/$PLAYER/ipfs/moa/index.html fi diff --git a/tools/VOEUX.refresh.sh b/tools/VOEUX.refresh.sh index 57ce65c2..d5777ad9 100755 --- a/tools/VOEUX.refresh.sh +++ b/tools/VOEUX.refresh.sh @@ -38,11 +38,8 @@ do echo "ipfs key rm $voeu && rm -Rf ~/.zen/game/world/$voeu" continue else - # Downloading "tag=tube" - - echo "$MY_PATH/TUBE.tw.sh ~/.zen/tmp/work/index.html $voeu" - echo "PLEASE MANUAL RUN" - read + ## Replace tube links with downloaded video + $MY_PATH/TUBE.copy.sh ~/.zen/tmp/work/index.html $voeu # Update local copy cp ~/.zen/tmp/work/index.html ~/.zen/game/world/$voeu/index.html