From 626139a0b89b02c63dd0b3871925c20c673793e4 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 7 Jan 2016 18:47:19 +0100 Subject: Add an example post-save hook Signed-off-by: Lukas Fleischer --- contrib/post-save-commit.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 contrib/post-save-commit.sh (limited to 'contrib') 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 -- cgit v1.2.3-70-g09d2