From 1a2819f8118acfdd020925515b5bffd94f6a2654 Mon Sep 17 00:00:00 2001 From: Fate Date: Sun, 31 May 2009 13:24:25 +0000 Subject: Fixed build-magic to only require a single sed process --- conf/build-magic.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'conf') diff --git a/conf/build-magic.sh b/conf/build-magic.sh index 94d1a01f..f064a286 100755 --- a/conf/build-magic.sh +++ b/conf/build-magic.sh @@ -1,21 +1,21 @@ -#! /bin/sh +#! /bin/bash -RSCRIPT="spells-build.sh" +RSCRIPT="spells-build" if [ -a $RSCRIPT ]; then printf ""; else - echo '#! /bin/sh' > $RSCRIPT; - echo 'cat \' >> $RSCRIPT; + echo '#! /bin/bash' > $RSCRIPT; + echo 'sed \' >> $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; + echo "'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."; +then echo "${RSCRIPT} 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 +fi -- cgit v1.2.3-60-g2f50