diff options
author | Lukas Fleischer <lfleischer@calcurse.org> | 2016-02-07 13:10:47 +0100 |
---|---|---|
committer | Lukas Fleischer <lfleischer@calcurse.org> | 2016-02-07 13:12:18 +0100 |
commit | cfd9fc316d2d96afbe5a5e3ff1bbc33d199ac850 (patch) | |
tree | ccc150d895dace2f5d5d18c7ba303885aea24e72 /contrib/hooks | |
parent | 812c6b1dd6989b0b630f4eb2c4a0f5c4c4fca7fe (diff) | |
download | calcurse-cfd9fc316d2d96afbe5a5e3ff1bbc33d199ac850.tar.gz calcurse-cfd9fc316d2d96afbe5a5e3ff1bbc33d199ac850.zip |
Move example hook to contrib/hooks/
The contrib/ directory now contains another script that is not directly
related to hooks. Clean things up by placing example hooks in a separate
subdirectory.
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'contrib/hooks')
-rw-r--r-- | contrib/hooks/post-save-commit.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/hooks/post-save-commit.sh b/contrib/hooks/post-save-commit.sh new file mode 100644 index 0000000..d68461a --- /dev/null +++ b/contrib/hooks/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 |