X-Git-Url: https://plomlompom.com/repos/test.html?a=blobdiff_plain;f=roguelike;h=a0be8cc77f2e27f15d4e98b28ff8f8a9b9f502fe;hb=3fb2cb493ae564f8b14ddb4143b6c1f5bf16f16a;hp=ec72ca9481b56a1edf193548a4ee09431c5b99cd;hpb=df1953b0cde02f3e5fd5f80a08d600f691efa59c;p=plomrogue
diff --git a/roguelike b/roguelike
index ec72ca9..a0be8cc 100755
--- a/roguelike
+++ b/roguelike
@@ -1,32 +1,9 @@
#!/bin/sh
-# Abort the script on error.
-set -e
-
-# Use the shell script's arguments to the server's arguments.
-./roguelike-server $@ &
-
-# Give server some time to start up and exit on error.
-sleep 0.01
-
-# The client should not start if the server is not running. (If the server was
-# running in the foreround, any error exit of it so far would be caught by "set
-# -e" above. But "set -e" is blind to error codes generated in the background.)
-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 1000 ]
-do
- sleep 0.01
- i=`expr $i + 1`
-done
-if [ ! -e server/out ]
+# Wrapper to the script so that its suppressed server messages get read on exit.
+./start_server_client_union.sh "$@"
+sync
+if [ -e ./log ]
then
- echo "Server failed generating outfile within given time limit."
- false
+ cat log
fi
-
-# Only start the interface when everything else went well.
-kill -0 $! 2> /dev/null
-./roguelike-client