20 lines
640 B
Bash
Executable File
20 lines
640 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# This is an example hook. If the calcurse data directory contains a Git
|
|
# repository, it automatically makes a commit whenever synchronizing with a
|
|
# CalDAV server.
|
|
#
|
|
# In order to install this hook, copy this file to
|
|
# $XDG_CONFIG_HOME/calcurse/caldav/hooks/ (~/.config/calcurse/caldav/hooks/) or
|
|
# ~/.calcurse/caldav/hooks/ if using ~/.calcurse.
|
|
|
|
cd "$HOME"/.calcurse/
|
|
|
|
# If the data directory is under version control, create a Git commit.
|
|
if [ -d .git -a -x "$(which git)" ]; then
|
|
git add apts conf keys todo
|
|
if ! git diff-index --quiet --cached HEAD; then
|
|
git commit -m "Automatic commit by the post-sync hook"
|
|
fi
|
|
fi
|