From cfd9fc316d2d96afbe5a5e3ff1bbc33d199ac850 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sun, 7 Feb 2016 13:10:47 +0100 Subject: 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 --- contrib/hooks/post-save-commit.sh | 10 ++++++++++ contrib/post-save-commit.sh | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 contrib/hooks/post-save-commit.sh delete mode 100644 contrib/post-save-commit.sh (limited to 'contrib') 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 diff --git a/contrib/post-save-commit.sh b/contrib/post-save-commit.sh deleted file mode 100644 index d68461a..0000000 --- a/contrib/post-save-commit.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/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 -- cgit v1.2.3