diff options
-rwxr-xr-x | localikiwikicreatesite | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/localikiwikicreatesite b/localikiwikicreatesite index abcb063..e910f46 100755 --- a/localikiwikicreatesite +++ b/localikiwikicreatesite @@ -60,12 +60,15 @@ git push --all ## Adjust backend and add Makefile for further customization perl -pi -e ' - s,^(\s*)#?(srcdir\s*=>\s*\")(.*)(\"\,\s*),$1$2'$SRCDIR'$4,; - s,^(\s*)#?(destdir\s*=>\s*\")(.*)(\"\,\s*),$1$2'$DESTDIR'$4,; - s,^(\s*)#?(url\s*=>\s*\")(.*)(\"\,\s*),$1$2http://'$host'$4,; - s,^(\s*)#?(cgiurl\s*=>\s*\")(.*)(\"\,\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},; + ' $CFGDIR/ikiwiki.setup ( cd $CFGDIR git add ikiwiki.setup |