diff options
author | Fate <fate-tmw@googlemail.com> | 2009-05-31 13:24:25 +0000 |
---|---|---|
committer | Fate <fate-tmw@googlemail.com> | 2009-05-31 13:24:25 +0000 |
commit | 1a2819f8118acfdd020925515b5bffd94f6a2654 (patch) | |
tree | 9a52fcee47f289de1af17fc8ea8785ac3f97f7f1 /conf/build-magic.sh | |
parent | 2ce01b41dda7f66923aca0aafccf69dcdc1e135a (diff) | |
download | serverdata-1a2819f8118acfdd020925515b5bffd94f6a2654.tar.gz serverdata-1a2819f8118acfdd020925515b5bffd94f6a2654.tar.bz2 serverdata-1a2819f8118acfdd020925515b5bffd94f6a2654.tar.xz serverdata-1a2819f8118acfdd020925515b5bffd94f6a2654.zip |
Fixed build-magic to only require a single sed process
Diffstat (limited to 'conf/build-magic.sh')
-rwxr-xr-x | conf/build-magic.sh | 14 |
1 files changed, 7 insertions, 7 deletions
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 |