From abc02aac744134239b1fb14b8cee0c8adaaf7ebd Mon Sep 17 00:00:00 2001 From: Fate Date: Sat, 10 Jan 2009 02:30:44 -0700 Subject: 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. --- conf/build-magic.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 conf/build-magic.sh (limited to 'conf/build-magic.sh') 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 -- cgit v1.2.3-60-g2f50