[[ ${CURRENT} == "" ]]

This commit is contained in:
fred 2024-03-16 15:39:44 +01:00
parent b2a03f0f4e
commit 63f71ddec9
1 changed files with 2 additions and 2 deletions

View File

@ -14,9 +14,9 @@ MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
### CHECK and CORRECT .current
CURRENT=$(cat ~/.zen/game/players/.current/.player 2>/dev/null)
[[ ! ${CURRENT} ]] \
[[ ${CURRENT} == "" ]] \
&& lastplayer=$(ls -t ~/.zen/game/players 2>/dev/null | grep "@" | head -n 1) \
&& [[ ${lastplayer} ]] && rm ~/.zen/game/players/.current \
&& [[ ${lastplayer} ]] \
&& ln -s ~/.zen/game/players/${lastplayer} ~/.zen/game/players/.current && CURRENT=${lastplayer}
echo '