pacify set -u

This commit is contained in:
Gunter Labes 2009-05-26 16:56:35 +00:00
parent c4b9f374d7
commit 862bf66f20

View file

@ -17,7 +17,7 @@ SERVERBASE="$HOME/servers/$SERVER"
[ -d "$SERVERBASE"/replays ] || mkdir "$SERVERBASE"/replays
shift
if [ "$1" = "--test" ]; then
if [ $# -ge 1 ] && [ "$1" = "--test" ]; then
shift
PARAMETERS="$@"
cd "$SERVERBASE"/build || exit 1
@ -62,7 +62,7 @@ do
echo "started $SERVER server with command: 'wesnothd-$SERVER -c \"$SERVERBASE\"/wesnothd.cfg --port $PORT --threads $THREADS $PARAMETERS' (revision: $REV, pid: $PID) logging to: $LOG"
# wait a bit in case the process dies immediately
sleep 5
if jobs 1
if jobs 1 > /dev/null
then # create some convenient links
ln -s "$SERVERBASE/logs/$LOG" "$LOG.$PID"
rm -f "$SERVERBASE"/old.log "$SERVERBASE"/old.pid