summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/post-save-commit.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/post-save-commit.sh b/contrib/post-save-commit.sh
new file mode 100644
index 0000000..d68461a
--- /dev/null
+++ b/contrib/post-save-commit.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# Copy this file into ~/.calcurse/hooks/ and mark it executable to
+# automatically commit any changes to the calcurse data files using Git.
+
+cd "$HOME"/.calcurse/
+git add *
+if ! git diff-index --quiet --cached HEAD; then
+ git commit -m "Automatic commit by the post-save hook"
+fi