summaryrefslogtreecommitdiff
path: root/bin/restart-world
diff options
context:
space:
mode:
Diffstat (limited to 'bin/restart-world')
-rwxr-xr-xbin/restart-world28
1 files changed, 28 insertions, 0 deletions
diff --git a/bin/restart-world b/bin/restart-world
new file mode 100755
index 0000000..ccd9e45
--- /dev/null
+++ b/bin/restart-world
@@ -0,0 +1,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