From 63f71ddec955776c3da4555bf3e36b9eef9cf193 Mon Sep 17 00:00:00 2001 From: fred Date: Sat, 16 Mar 2024 15:39:44 +0100 Subject: [PATCH] [[ ${CURRENT} == "" ]] --- command.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command.sh b/command.sh index 9e32d565..533012a0 100755 --- a/command.sh +++ b/command.sh @@ -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 '