From 46da44abbedc58b918fa78c022bde2afcdd3ef6e Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Mon, 5 Mar 2018 19:23:12 +0100 Subject: Add title page and word-count script --- hooks/post-commit | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 hooks/post-commit (limited to 'hooks/post-commit') diff --git a/hooks/post-commit b/hooks/post-commit new file mode 100755 index 0000000..8e92990 --- /dev/null +++ b/hooks/post-commit @@ -0,0 +1,19 @@ +#!/bin/bash + +if [ -f .UPDATING_COUNT ] +then + exit 0 +fi + +echo "Checking word count…" + +./update-count.sh + +if git diff --quiet --exit-code -- index.md +then + exit 0 +fi + +touch .UPDATING_COUNT +git commit --amend --no-edit -- index.md +rm .UPDATING_COUNT -- cgit v1.2.3