summaryrefslogtreecommitdiff
path: root/hooks/post-commit
blob: 8e9299065dccbafd2360ea7fcb1e9eafd380110d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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