home · contact · privacy
In start script, give helpful advice to players not having compiled yet.
authorChristian Heller <c.heller@plomlompom.de>
Wed, 9 Jul 2014 23:45:23 +0000 (01:45 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Wed, 9 Jul 2014 23:45:23 +0000 (01:45 +0200)
start_server_client_union.sh

index 57133aae4c5b7ff28a2534ad9fbede305238d4c2..ac161b5d596fe0d74432c634772a2ea9b60a4290 100755 (executable)
@@ -3,6 +3,18 @@
 # Abort the script on error.
 set -e
 
+# Give helpful message to players that want to start without compiling first.
+if [ ! -e ./roguelike-server ]
+then
+    echo 'No ./roguelike-server file found to execute. Try "make" first?'
+    false
+fi
+if [ ! -e ./roguelike-client ]
+then
+    echo 'No ./roguelike-client file found to execute. Try "make" 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 &