From d253e220256f82f958cabbe58aaede0984a1d6fe Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 11 Feb 2008 17:50:30 +0000 Subject: Simplify regex'es: Drop unneeded escaping of double quotes. --- localikiwikicreatesite | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'localikiwikicreatesite') 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" -- cgit v1.2.3