summaryrefslogtreecommitdiff
path: root/tools/bin/restart-world
blob: ccd9e453ec3744b8cc7caa93bc546e843382fa8d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/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