Author: soliton
Date: Sat May 23 15:26:18 2009
New Revision: 35846

URL: http://svn.gna.org/viewcvs/wesnoth?rev=35846&view=rev
Log:
removed some bashisms

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=35846&r1=35845&r2=35846&view=diff
==============================================================================
--- trunk/utils/mp-server/run_campaignd (original)
+++ trunk/utils/mp-server/run_campaignd Sat May 23 15:26:18 2009
@@ -41,10 +41,10 @@
        COMMAND="$HOME/bin/campaignd-$VERSION $THREADS $PARAMETERS"
        LOG="$SERVERBASE/logs/campaignd.$DATE.log"
        echo "started $VERSION campaignd with command: '$COMMAND' logging to: 
$LOG"
-       $COMMAND &> $LOG
+       $COMMAND > $LOG 2>&1
        EXIT_CODE="$?"
        echo "exit code: $EXIT_CODE"
-       mv gmon.out gmon.$DATE.out &> /dev/null
+       mv gmon.out gmon.$DATE.out > /dev/null 2>&1
        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

Modified: trunk/utils/mp-server/run_server
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/mp-server/run_server?rev=35846&r1=35845&r2=35846&view=diff
==============================================================================
--- trunk/utils/mp-server/run_server (original)
+++ trunk/utils/mp-server/run_server Sat May 23 15:26:18 2009
@@ -70,14 +70,14 @@
        BUILDDIR=$(ls -ld "$SERVERBASE"/build | sed -nre 
's,.*(\.\./builds/wesnothd-[^ ]+/),\1,p')
        REV=r$(echo $BUILDDIR | sed -nre 
"s,.*wesnothd-svn-([0-9:SM]+)_$SERVER/$,\1,p")
        LOG="wesnothd.$DATE.$REV.log"
-       bin/wesnothd-$SERVER -c "$SERVERBASE"/wesnothd.cfg --port $PORT 
--threads $THREADS $PARAMETERS &> "$SERVERBASE/logs/$LOG" &
+       bin/wesnothd-$SERVER -c "$SERVERBASE"/wesnothd.cfg --port $PORT 
--threads $THREADS $PARAMETERS > "$SERVERBASE/logs/$LOG" 2>&1 &
        PID=$!
        echo "started $SERVER server with command: 'wesnothd-$SERVER -c 
\"$SERVERBASE\"/wesnothd.cfg --port $PORT --threads $THREADS $PARAMETERS' 
(revision: $REV, pid: $PID) logging to: $LOG"
        # create some convenient links
        ln -s "$SERVERBASE/logs/$LOG" "$LOG.$PID"
-       rm -f "$SERVERBASE"/old.{log,pid}
-       mv "$SERVERBASE"/current.log "$SERVERBASE"/old.log &> /dev/null
-       mv "$SERVERBASE"/current.pid "$SERVERBASE"/old.pid &> /dev/null
+       rm -f "$SERVERBASE"/old.log "$SERVERBASE"/old.pid
+       mv "$SERVERBASE"/current.log "$SERVERBASE"/old.log > /dev/null 2>&1
+       mv "$SERVERBASE"/current.pid "$SERVERBASE"/old.pid > /dev/null 2>&1
        echo $PID > "$SERVERBASE"/current.pid
        ln -s "logs/$LOG" "$SERVERBASE"/current.log
        # wait for the server to terminate
@@ -86,7 +86,7 @@
        EXIT_CODE=$?
        echo "wesnothd exited with code: $EXIT_CODE"
        # 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
+       mv "$SERVERBASE/$BUILDDIR/gmon.out" 
"$SERVERBASE/$BUILDDIR/gmon.$DATE.$REV.out" > /dev/null 2>&1
        # check for return code if not zero or 98 (port in use) the server 
should be restarted
        case $EXIT_CODE in
                0)      exit ;;


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

Reply via email to