summaryrefslogtreecommitdiff
path: root/localikiwikicreatesite
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2008-02-11 17:50:30 +0000
committerJonas Smedegaard <dr@jones.dk>2008-02-11 17:50:30 +0000
commitd253e220256f82f958cabbe58aaede0984a1d6fe (patch)
treef438588cba6cd9f8f101ced759f2e32c2d234ffc /localikiwikicreatesite
parentd7361fd38dffb32f890331629aef20fca2f5bc07 (diff)
Simplify regex'es: Drop unneeded escaping of double quotes.
Diffstat (limited to 'localikiwikicreatesite')
-rwxr-xr-xlocalikiwikicreatesite13
1 files changed, 7 insertions, 6 deletions
diff --git a/localikiwikicreatesite b/localikiwikicreatesite
index e910f46..8a89afe 100755
--- a/localikiwikicreatesite
+++ b/localikiwikicreatesite
@@ -60,14 +60,14 @@ git push --all
## Adjust backend and add Makefile for further customization
perl -pi -e '
- s,^(\s*)#?(srcdir\s*=>\s*\")[^\"]*(\"\,\s*),$1$2'$SRCDIR'$3,;
- s,^(\s*)#?(destdir\s*=>\s*\")[^\"]*(\"\,\s*),$1$2'$DESTDIR'$3,;
- s,^(\s*)#?(url\s*=>\s*\")[^\"]*(\"\,\s*),$1$2http://'$host'$3,;
- s,^(\s*)#?(cgiurl\s*=>\s*\")([^\"]*)(\"\,\s*),$1#$2$3$4,;
- s,^(\s*)#?(rcs\s*=>\s*\")(git)(\"\,\s*),$1$2$3$4,;
+ s,^(\s*)#?(srcdir\s*=>\s*")[^"]*("\,\s*),$1$2'$SRCDIR'$3,;
+ s,^(\s*)#?(destdir\s*=>\s*")[^"]*("\,\s*),$1$2'$DESTDIR'$3,;
+ s,^(\s*)#?(url\s*=>\s*")[^"]*("\,\s*),$1$2http://'$host'$3,;
+ s,^(\s*)#?(cgiurl\s*=>\s*")([^"]*)("\,\s*),$1#$2$3$4,;
+ s,^(\s*)#?(rcs\s*=>\s*")(git)("\,\s*),$1$2$3$4,;
' $CFGDIR/ikiwiki.setup
perl -0 -pi -e '
- s,#{([\s#]*The git post-update wrapper[^}]*\s*)#(\s*wrapper =>\s*\")[^\"]*(/hooks/post-update\"\,\s*[^}]*)#(\s*wrappermode =>[^}]*)#},{$1$2'$DESTSRCDIR/content.git'$3$4},;
+ s,#{([\s#]*The git post-update wrapper[^}]*\s*)#(\s*wrapper =>\s*")[^"]*(/hooks/post-update"\,\s*[^}]*)#(\s*wrappermode =>[^}]*)#},{$1$2'$DESTSRCDIR/content.git'$3$4},;
' $CFGDIR/ikiwiki.setup
(
cd $CFGDIR
@@ -87,6 +87,7 @@ $(underlays):
cd $@ && git remote add -f -t $(master:LOCALE=$(locale)) -m $(master:LOCALE=$(locale)) origin http://source.jones.dk/ikiwiki_$@.git
cd $@ && git merge origin
EOF
+
echo /Makefile > .gitignore
git add Makefile
git commit -m "Setup local paths"