summaryrefslogblamecommitdiff
path: root/tools/bin/restart-world
blob: ccd9e453ec3744b8cc7caa93bc546e843382fa8d (plain) (tree)

























                                                                              

                     
#!/bin/bash -e
cd "$1"
shift

source restart-config

for ARG
do
    if [ "$ARG" = --auto ]
    then
        PULL=y
    elif [ "$ARG" = --manual ]
    then
        PULL=
    else
        echo unknown argument
        exit 1
    fi
done

if test -n "$PULL"
then
    git pull
    (cd world/map/conf; cat magic.conf.template | ./spells-build > magic.conf)
fi

restart-pid tmwa-char
restart-pid tmwa-map