diff options
author | Fate <fate-tmw@googlemail.com> | 2009-01-10 02:30:44 -0700 |
---|---|---|
committer | Fate <fate-tmw@googlemail.com> | 2009-01-10 02:30:44 -0700 |
commit | abc02aac744134239b1fb14b8cee0c8adaaf7ebd (patch) | |
tree | acbc2d7dba626a1daeadc6649de548d617127729 /conf/build-magic.sh | |
parent | bfea41dd3353f915e14b2948e7d9ee5e2efdd56a (diff) | |
download | classic-serverdata-abc02aac744134239b1fb14b8cee0c8adaaf7ebd.tar.gz classic-serverdata-abc02aac744134239b1fb14b8cee0c8adaaf7ebd.tar.bz2 classic-serverdata-abc02aac744134239b1fb14b8cee0c8adaaf7ebd.tar.xz classic-serverdata-abc02aac744134239b1fb14b8cee0c8adaaf7ebd.zip |
Moved magic.conf to magic.conf.template. Magic.conf should be
generated using build-magic.sh, which will first build a spells-build.sh
file (which should then be edited by hand to set spell invocations) and,
on subsequent calls, apply the spells-build.sh file.
Diffstat (limited to 'conf/build-magic.sh')
-rwxr-xr-x | conf/build-magic.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/conf/build-magic.sh b/conf/build-magic.sh new file mode 100755 index 00000000..94d1a01f --- /dev/null +++ b/conf/build-magic.sh @@ -0,0 +1,21 @@ +#! /bin/sh + +RSCRIPT="spells-build.sh" + +if [ -a $RSCRIPT ]; then printf ""; else + echo '#! /bin/sh' > $RSCRIPT; + echo 'cat \' >> $RSCRIPT; + chmod a+x $RSCRIPT +fi + +for n in `grep -o '"#..."' magic.conf.template`; do + if grep $n $RSCRIPT; then printf ""; else + CHANGES=1 + echo "|sed 's/${n}/${n}/' \\" >> $RSCRIPT; + fi +done + +if [ x$CHANGES == x1 ] +then echo "spells-build.sh has been updated; please provide invocations for spells and/or teleport anchors."; +else cat magic.conf.template | ./$RSCRIPT > magic.conf; +fi
\ No newline at end of file |