From df1953b0cde02f3e5fd5f80a08d600f691efa59c Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Wed, 5 Feb 2014 16:32:38 +0100
Subject: [PATCH] Repaired buggy check for out file generation time in init
 shell script.

---
 roguelike | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/roguelike b/roguelike
index dadab3c..ec72ca9 100755
--- a/roguelike
+++ b/roguelike
@@ -16,12 +16,17 @@ kill -0 $! 2> /dev/null
 
 # Give server some time (max. 10 seconds) to generate its out file.
 i=0
-while [ ! -e server/out ] && [ $i -le 10000 ]
+while [ ! -e server/out ] && [ $i -le 1000 ]
 do
     sleep 0.01
     i=`expr $i + 1`
 done
-kill -0 $! 2> /dev/null
+if [ ! -e server/out ]
+then
+    echo "Server failed generating outfile within given time limit."
+    false
+fi
 
 # Only start the interface when everything else went well.
+kill -0 $! 2> /dev/null
 ./roguelike-client
-- 
2.30.2