From 35ff5a78352065fba34385b9b1256d17400c7eca Mon Sep 17 00:00:00 2001 From: Andy2 Date: Thu, 23 Sep 2010 06:41:37 -0700 Subject: [PATCH] exit on logdir being gone before grepping it --- xwords4/linux/scripts/discon_ok2.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xwords4/linux/scripts/discon_ok2.sh b/xwords4/linux/scripts/discon_ok2.sh index c6d87f86b..cd847fd60 100755 --- a/xwords4/linux/scripts/discon_ok2.sh +++ b/xwords4/linux/scripts/discon_ok2.sh @@ -65,7 +65,9 @@ do_device() { sleep 1 done - if grep -q 'all remaining tiles' $LOG; then + if [ ! -d $LOGDIR ]; then + break; + elif grep -q 'all remaining tiles' $LOG; then echo -n "device $DEV in game $GAME succeeded ($LOG $(connName $LOG)) " date mv $LOG $DONEDIR @@ -75,8 +77,6 @@ do_device() { echo -n "($LOG $(connName $LOG)) " date break - elif [ ! -d $LOGDIR ]; then - break; fi done }