summaryrefslogtreecommitdiff
path: root/hooks/post-commit
blob: e84601ee3b5a7fa6f2d0557e7fe4b6b629e258fb (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 -- README.md
then
    exit 0
fi

touch .UPDATING_COUNT
git commit --amend --no-edit -- README.md
rm .UPDATING_COUNT