Author: soliton
Date: Sat May 16 16:21:06 2009
New Revision: 35653

URL: http://svn.gna.org/viewcvs/wesnoth?rev=35653&view=rev
Log:
minor readability tweaks

Modified:
    trunk/utils/mp-server/run_campaignd
    trunk/utils/mp-server/run_server

Modified: trunk/utils/mp-server/run_campaignd
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/mp-server/run_campaignd?rev=35653&r1=35652&r2=35653&view=diff
==============================================================================
--- trunk/utils/mp-server/run_campaignd (original)
+++ trunk/utils/mp-server/run_campaignd Sat May 16 16:21:06 2009
@@ -24,7 +24,7 @@
        ;;
 esac
 
-SERVERBASE=$HOME/campaignd/$VERSION/
+SERVERBASE=$HOME/campaignd/$VERSION
 
 [ -d "$SERVERBASE" ] || die "Server '$VERSION' not found."
 [ -d "$SERVERBASE/data" ] || die "Server '$VERSION' has no data/ dir."
@@ -44,9 +44,8 @@
        EXIT_CODE="$?"
        echo "exit code: $EXIT_CODE"
        mv gmon.out gmon.$DATE.out &> /dev/null
-       [ "$EXIT_CODE" != "0" ] || exit
-       [ "$EXIT_CODE" != "1" ] || dietail #"File I/O error."
-       [ "$EXIT_CODE" != "2" ] || dietail #"Could not parse config file."
-       [ "$EXIT_CODE" != "3" ] || dietail #"Could not bind to port."
-       [ "$EXIT_CODE" != "127" ] || dietail #cannot open shared object file
+       case $EXIT_CODE in
+               0)      exit ;;
+               1|2|3|127)      dietail ;; #"File I/O error." #"Could not parse 
config file." #"Could not bind to port." #cannot open shared object file
+       esac
 done

Modified: trunk/utils/mp-server/run_server
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/mp-server/run_server?rev=35653&r1=35652&r2=35653&view=diff
==============================================================================
--- trunk/utils/mp-server/run_server (original)
+++ trunk/utils/mp-server/run_server Sat May 16 16:21:06 2009
@@ -89,6 +89,8 @@
        # need to use the recorded path since the build/ symlink might have 
changed
        mv "$SERVERBASE/$BUILDDIR/gmon.out" 
"$SERVERBASE/$BUILDDIR/gmon.$DATE.$REV.out" &> /dev/null
        # check for return code if not zero or 98 (port in use) the server 
should be restarted
-       [ "$EXIT_CODE" != "0" ] || exit 0
-       [ "$EXIT_CODE" != "98" ] || dietail #Could not bind to port
+       case $EXIT_CODE in
+               0)      exit ;;
+               98)     dietail ;; #Could not bind to port
+       esac
 done


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to