#!/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