This commit is contained in:
fred 2023-03-10 19:18:58 +01:00
parent d69ac4bf14
commit 0c55445a0f
2 changed files with 3 additions and 3 deletions

View File

@ -15,13 +15,13 @@ echo "## RUNNING PLAYER.refresh"
PLAYERONE="$1"
# [[ $isLAN ]] && PLAYERONE=$(cat ~/.zen/game/players/.current/.player 2>/dev/null)
[[ ! $PLAYERONE ]] && PLAYERONE=($(ls -t ~/.zen/game/players/ | grep -Ev "localhost" 2>/dev/null))
[[ ! $PLAYERONE ]] && PLAYERONE=($(ls -t ~/.zen/game/players/ | grep "@" 2>/dev/null))
echo "FOUND : ${PLAYERONE[@]}"
## RUNING FOR ALL LOCAL PLAYERS
for PLAYER in ${PLAYERONE[@]}; do
[[ ! -d ~/.zen/game/players/$PLAYER ]] && echo "BAD $PLAYERONE" && continue
[[ ! -d ~/.zen/game/players/${PLAYER:-undefined} ]] && echo "BAD $PLAYERONE" && continue
# CLEAN LOST ACCOUNT
[[ ! -f ~/.zen/game/players/$PLAYER/secret.dunikey ]] && rm -Rf ~/.zen/game/players/$PLAYER

View File

@ -7,7 +7,7 @@ MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
img_dir="$1"
if [[ ! -d $img_dir ]]; then
PLAYERONE=($(ls -t ~/.zen/game/players/ | grep -Ev "localhost" 2>/dev/null))
PLAYERONE=($(ls -t ~/.zen/game/players/ | grep -Ev "@" 2>/dev/null))
[[ ! $PLAYERONE ]] && echo "NO PLAYER IN THE GAME HERE" && exit 1
echo "ASTROPORT STATION CAROUSEL MODE"