summaryrefslogtreecommitdiff
path: root/pre-commit.sh
blob: 6841365afa910277b6218ea95721baf7962c9471 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
if sed --version | grep -q 'GNU sed'; then
	for file in pom.c pom.h; do
		# Remove trailing white space
		# (But only if file actually has trailing white space
		#  we don't want to mess up last-modified-times otherwise)
		grep -q '\s\s*$' $file && sed -i 's/\s\s*$//' $file
	done
fi
which doxygen >/dev/null 2>/dev/null && { doxygen || exit 1; }
git add -u