summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2008-02-12 05:31:28 +0000
committerJonas Smedegaard <dr@jones.dk>2008-02-12 05:31:28 +0000
commit588cdfe509aa3ac20ab8e023f1b45e7bef311a61 (patch)
treeaebdfaa8c2d3895afa7305f5d78522f83a010578
parentf813b97a0e3a45d3d42664119bbb4042bb3bcf1d (diff)
Preserve (and enable) default Git post-update hook.
-rwxr-xr-xlocalikiwikicreatesite4
1 files changed, 3 insertions, 1 deletions
diff --git a/localikiwikicreatesite b/localikiwikicreatesite
index b15d1f3..27cc00a 100755
--- a/localikiwikicreatesite
+++ b/localikiwikicreatesite
@@ -70,9 +70,11 @@ perl -0 -pi -e '
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
(
+perl -0 -pi -e 's,\n(exec\s[^\n]*),\nhooks/post-update-ikiwiki\n\n$1,' $DESTSRCDIR/content.git/hooks/post-update
+chmod +x $DESTSRCDIR/content.git/hooks/post-update
cd $CFGDIR
git add ikiwiki.setup
-git commit -m "Adjust ikiwiki.setup to use actual paths and enable Git post-update wrapper"
+git commit -m "Adjust ikiwiki.setup to use actual paths, and add+enable Git post-update hooks"
)
## Add Makefile for further customization