summaryrefslogtreecommitdiff
path: root/hooks/post-commit
blob: 47e5c117a7418634ae45389ac00db2331e5efb49 (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 -- README.md
rm .UPDATING_COUNT