calcurse-caldav: Add hook support
Introduce pre-sync and post-sync hooks which need to be located under ~/.calcurse/caldav/hooks/ and are executed before/after synchronization with a CalDAV server. Also, add an example post-sync hook and change the example post-save hook such that it does not create tiny commits during synchronization. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
@@ -4,6 +4,10 @@
|
||||
# automatically commit any changes to the calcurse data files using Git.
|
||||
|
||||
cd "$HOME"/.calcurse/
|
||||
|
||||
# Do not make commits when synchronizing with a CalDAV server.
|
||||
[ -f caldav/lock ] && exit
|
||||
|
||||
git add *
|
||||
if ! git diff-index --quiet --cached HEAD; then
|
||||
git commit -m "Automatic commit by the post-save hook"
|
||||
|
||||
Reference in New Issue
Block a user