aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/caldav/hooks/post-sync
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/caldav/hooks/post-sync')
-rwxr-xr-xcontrib/caldav/hooks/post-sync12
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/caldav/hooks/post-sync b/contrib/caldav/hooks/post-sync
new file mode 100755
index 0000000..94b6ed3
--- /dev/null
+++ b/contrib/caldav/hooks/post-sync
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# Copy this file into ~/.calcurse/caldav/hooks/ and mark it executable to
+# automatically commit changes after syncing using Git.
+
+cd "$HOME"/.calcurse/
+
+git add *
+if ! git diff-index --quiet --cached HEAD; then
+ git commit -m "Automatic commit by the post-sync hook"
+fi
+