aboutsummaryrefslogtreecommitdiff
path: root/share/ikiwiki/bin/post-receive
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-10-26 12:48:18 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-10-26 12:48:18 -0200
commit8f09a50e47eb2a6a0e666c8437774889c60e133c (patch)
tree10d17f6282ad7023eadaa77c15c7551e1bfb27ab /share/ikiwiki/bin/post-receive
downloadtemplater-8f09a50e47eb2a6a0e666c8437774889c60e133c.tar.gz
templater-8f09a50e47eb2a6a0e666c8437774889c60e133c.tar.bz2
Initial import
Diffstat (limited to 'share/ikiwiki/bin/post-receive')
-rwxr-xr-xshare/ikiwiki/bin/post-receive21
1 files changed, 21 insertions, 0 deletions
diff --git a/share/ikiwiki/bin/post-receive b/share/ikiwiki/bin/post-receive
new file mode 100755
index 0000000..627198d
--- /dev/null
+++ b/share/ikiwiki/bin/post-receive
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+# Post-receive git hook
+#
+
+cd ..
+unset GIT_DIR
+
+if [ -d ".git/annex" ]; then
+ git annex sync
+else
+ git config receive.denyCurrentBranch ignore
+ #git reset HEAD
+ git checkout -f
+fi
+
+git submodule sync --recursive
+git submodule update --init --recursive
+
+cd -
+exec git update-server-info