home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Repaired buggy check for out file generation time in init shell script.
[plomrogue]
/
roguelike
diff --git
a/roguelike
b/roguelike
index 2143f05623a0c98136634c7475aaa5c565d7a707..ec72ca9481b56a1edf193548a4ee09431c5b99cd 100755
(executable)
--- a/
roguelike
+++ b/
roguelike
@@
-1,8
+1,5
@@
#!/bin/sh
#!/bin/sh
-# This is only to ensure I write no unintentional bashisms.
-set -o posix
-
# Abort the script on error.
set -e
# Abort the script on error.
set -e
@@
-19,12
+16,17
@@
kill -0 $! 2> /dev/null
# Give server some time (max. 10 seconds) to generate its out file.
i=0
# Give server some time (max. 10 seconds) to generate its out file.
i=0
-while [ ! -e server/out ] && [ $i -le 1000
0
]
+while [ ! -e server/out ] && [ $i -le 1000 ]
do
sleep 0.01
i=`expr $i + 1`
done
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.
# Only start the interface when everything else went well.
+kill -0 $! 2> /dev/null
./roguelike-client
./roguelike-client