From fa04f27710ebf38e86222f7a556699b79ea959b0 Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 2 May 2023 03:08:16 +0200 Subject: [PATCH] MAP.refresh is NOT ASTROBOT program : move to tools --- ASTROBOT/MAP.refresh.sh | 52 -------------------------------------- ASTROBOT/PLAYER.refresh.sh | 2 +- 2 files changed, 1 insertion(+), 53 deletions(-) delete mode 100755 ASTROBOT/MAP.refresh.sh diff --git a/ASTROBOT/MAP.refresh.sh b/ASTROBOT/MAP.refresh.sh deleted file mode 100755 index e286aa42..00000000 --- a/ASTROBOT/MAP.refresh.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -################################################################################ -# Author: Fred (support@qo-op.com) -# Version: 0.2 -# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/) -################################################################################ -MY_PATH="`dirname \"$0\"`" # relative -MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized -. "$MY_PATH/../tools/my.sh" -################################################################################ -## Publish All PLAYER TW, -# Run TAG subprocess: tube, voeu -############################################ -echo "## RUNNING MAP.refresh" -[[ ${IPFSNODEID} == "" ]] && echo "IPFSNODEID is empty - EXIT -" && exit 1 - -################################################################# -## IPFSNODEID ASTRONAUTES SIGNALING ## 12345 port -############################ - -# UDATE STATION BALISE -if [[ -d ~/.zen/tmp/${IPFSNODEID} ]]; then - - # ONLY FRESH DATA HERE - # BSIZE=$(du -b ~/.zen/tmp/${IPFSNODEID} | tail -n 1 | cut -f 1) - ## Getting actual online version - # ipfs get -o ~/.zen/tmp/${IPFSNODEID} /ipns/${IPFSNODEID}/ - - ## COPY STATION yt-dlp.list - cp $HOME/.zen/.yt-dlp.list ~/.zen/tmp/${IPFSNODEID}/yt-dlp.list - - ## COPY COINS VALUE OF THE DAY - cp ~/.zen/tmp/coucou/*.COINS ~/.zen/tmp/${IPFSNODEID}/ - - ## COPY FRIENDS - PLAYERONE=($(ls -t ~/.zen/game/players/ | grep "@" 2>/dev/null)) - echo "FOUND : ${PLAYERONE[@]}" - ## RUNING FOR ALL LOCAL PLAYERS - for PLAYER in ${PLAYERONE[@]}; do - echo "${PLAYER} SEEKING OWN FRIENDS" - mkdir -p ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/FRIENDS/ - cp -Rf ~/.zen/game/players/${PLAYER}/FRIENDS/* ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/FRIENDS/ - done - echo "############################################ MY MAP " - ls ~/.zen/tmp/${IPFSNODEID}/ - echo "############################################" - NSIZE=$(du -b ~/.zen/tmp/${IPFSNODEID} | tail -n 1 | cut -f 1) - ROUTING=$(ipfs add -rwHq ~/.zen/tmp/${IPFSNODEID}/* | tail -n 1 ) - ipfs name publish /ipfs/${ROUTING} - echo ">> $NSIZE Bytes STATION BALISE > ${myIPFS}/ipns/${IPFSNODEID}" - -fi diff --git a/ASTROBOT/PLAYER.refresh.sh b/ASTROBOT/PLAYER.refresh.sh index f86b454b..a89f03cf 100755 --- a/ASTROBOT/PLAYER.refresh.sh +++ b/ASTROBOT/PLAYER.refresh.sh @@ -238,6 +238,6 @@ for PLAYER in ${PLAYERONE[@]}; do done echo "PLAYER.refresh DONE." -${MY_PATH}/MAP.refresh.sh +${MY_PATH}/../tools/MAP.refresh.sh exit 0