X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/copy_structured?a=blobdiff_plain;f=start_server_client_union.sh;h=3b7dccc387636e8a82b4b7aa05a4d4a8cbae7e40;hb=3cd4a494e34b587481a88fd24b4f9107bc35ab7f;hp=57133aae4c5b7ff28a2534ad9fbede305238d4c2;hpb=e851cb0c3df489c68f29bb6cef02c7bc061c3251;p=plomrogue diff --git a/start_server_client_union.sh b/start_server_client_union.sh index 57133aa..3b7dccc 100755 --- a/start_server_client_union.sh +++ b/start_server_client_union.sh @@ -3,12 +3,28 @@ # Abort the script on error. set -e +# Don't let any log leftovers from before interfere. +if [ -e ./log ] +then + rm log +fi + +# Give helpful message to players that want to start without compiling first. +if [ ! -e ./roguelike-client ] +then + echo 'No ./roguelike-client executable found. Try "./redo" first?' + false +fi +if [ ! -e ./libplomrogue.so ] +then + echo 'No ./libplomrogue.so library found. Try "./redo" first?' + false +fi + # Use shell script's arguments for server and pipe server output to log file. # This script's wrapper script will read it out on exit. ./roguelike-server "$@" > log 2>&1 & -echo TEST >> log - # Give server some time to start up and exit on error. sleep 0.01