Lukas Fleischer e5ba06ff5d 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>
2016-02-07 13:29:44 +01:00

13 lines
284 B
Bash
Executable File

#!/bin/sh
#
# Copy this file into ~/.calcurse/caldav/hooks/ and mark it executable to
# automatically commit changes after syncing using Git.
cd "$HOME"/.calcurse/
git add *
if ! git diff-index --quiet --cached HEAD; then
git commit -m "Automatic commit by the post-sync hook"
fi