Add pre-save and post-save hooks

This adds support for hooks which are executed before/after saving
calcurse data. Hooks can be placed under hooks/pre-save and
hooks/post-save in the data directory and need to be executable.

Potential use cases include:

* Automatically commit any changes to the data files using a VCS.
* Automatically sync with some sever component on data file changes.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Lukas Fleischer
2016-01-07 18:23:09 +01:00
parent ddfe49d9fe
commit 767214e4f1
5 changed files with 75 additions and 0 deletions

View File

@@ -111,6 +111,7 @@ char path_keys[] = "";
char path_cpid[] = "";
char path_dpid[] = "";
char path_dmon_log[] = "";
char path_hooks[] = "";
/* Variable to store global configuration. */
struct conf conf;