X-Git-Url: https://plomlompom.com/repos/index.html?a=blobdiff_plain;ds=sidebyside;f=roguelike;h=efb362c98ec526c18210bbddf90762ed8cd79008;hb=e851cb0c3df489c68f29bb6cef02c7bc061c3251;hp=3ea498d6478814146481e50f33bd3cc7428673d9;hpb=d12efb0addf420adc045cfb96647dff6241310ee;p=plomrogue
diff --git a/roguelike b/roguelike
index 3ea498d..efb362c 100755
--- a/roguelike
+++ b/roguelike
@@ -1,32 +1,6 @@
#!/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 foreground, 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 worldstate file.
-i=0
-while [ ! -e server/worldstate ] && [ $i -le 1000 ]
-do
- sleep 0.01
- i=`expr $i + 1`
-done
-if [ ! -e server/worldstate ]
-then
- echo "Server failed generating worldstate file within given time limit."
- false
-fi
-
-# Only start the interface when everything else went well.
-kill -0 $! 2> /dev/null
-./roguelike-client
+# Wrapper to the script so that its suppressed server messages get read on exit.
+./start_server_client_union.sh "$@"
+sync
+cat log