diff options
author | Lukas Fleischer <lfleischer@calcurse.org> | 2016-01-07 18:47:19 +0100 |
---|---|---|
committer | Lukas Fleischer <lfleischer@calcurse.org> | 2016-01-07 19:20:46 +0100 |
commit | 626139a0b89b02c63dd0b3871925c20c673793e4 (patch) | |
tree | d5c08029f830e3921c16af9006c74bd75d2bcf76 /contrib | |
parent | 767214e4f157ae4a74be0b557bd49e24d972970b (diff) | |
download | calcurse-626139a0b89b02c63dd0b3871925c20c673793e4.tar.gz calcurse-626139a0b89b02c63dd0b3871925c20c673793e4.zip |
Add an example post-save hook
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/post-save-commit.sh | 10 |
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 |