aboutsummaryrefslogtreecommitdiff
path: root/ikiwiki
diff options
context:
space:
mode:
Diffstat (limited to 'ikiwiki')
-rw-r--r--ikiwiki/Makefile15
-rwxr-xr-xikiwiki/bin/post-update8
2 files changed, 22 insertions, 1 deletions
diff --git a/ikiwiki/Makefile b/ikiwiki/Makefile
index 7fb2cc6..a9499b1 100644
--- a/ikiwiki/Makefile
+++ b/ikiwiki/Makefile
@@ -16,6 +16,21 @@
web:
@ikiwiki --setup ikiwiki.setup
+ @chmod +x bin/*
web_deploy:
+ #git push web
+ #git annex sync
@rsync -avz --delete www/ blog:/var/sites/blog/www/
+
+post_update:
+ git config receive.denyCurrentBranch ignore
+ cd .git/hooks && ln -sf ../../bin/post-update
+
+post_receive:
+ git config receive.denyCurrentBranch ignore
+ cd .git/hooks && ln -sf ../../bin/post-receive
+
+whoami:
+ git config user.name "User"
+ git config user.email user@example.org
diff --git a/ikiwiki/bin/post-update b/ikiwiki/bin/post-update
index 3098dab..beed524 100755
--- a/ikiwiki/bin/post-update
+++ b/ikiwiki/bin/post-update
@@ -2,7 +2,13 @@
cd ..
unset GIT_DIR
-git annex sync
+
+if [ -d ".git/annex" ]; then
+ git annex sync
+else
+ git reset HEAD
+ git checkout -f
+fi
cd -
exec git update-server-info