diff options
Diffstat (limited to 'localikiwikicreatesite')
-rwxr-xr-x | localikiwikicreatesite | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/localikiwikicreatesite b/localikiwikicreatesite index 2907174..b15d1f3 100755 --- a/localikiwikicreatesite +++ b/localikiwikicreatesite @@ -58,7 +58,7 @@ git config branch.master.merge refs/heads/master git push --all ) -## Adjust backend and add Makefile for further customization +## Adjust backend to actual paths, and enable Git post-update wrapper perl -pi -e ' s,^(\s*)#?(srcdir\s*=>\s*")[^"]*("\,\s*),$1$2'$SRCDIR'$3,; s,^(\s*)#?(destdir\s*=>\s*")[^"]*("\,\s*),$1$2'$DESTDIR'$3,; @@ -67,11 +67,15 @@ perl -pi -e ' 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*")[^"]*("\,\s*[^}]*)#(\s*wrappermode =>[^}]*)#},{$1$2'$DESTSRCDIR/content.git/hooks/post-update-backend'$3$4},; ' $CFGDIR/ikiwiki.setup ( cd $CFGDIR git add ikiwiki.setup +git commit -m "Adjust ikiwiki.setup to use actual paths and enable Git post-update wrapper" +) + +## Add Makefile for further customization cat <<'EOF' >$CFGDIR/Makefile #underlays = basewiki smiley templates underlays = templates @@ -87,11 +91,15 @@ $(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 +echo /Makefile >> $CFGDIR/.gitignore +( +cd $CFGDIR git add Makefile git commit -m "Setup local paths" -git push ) ikiwiki --verbose $SRCDIR $DESTDIR --url=http://"$host" --setup $CFGDIR/ikiwiki.setup +( +cd $CFGDIR +git push +) |