aboutsummaryrefslogtreecommitdiff
path: root/.hooks/pre-commit
blob: 886d97d7cc1bbd72247881dfc5ba0cff2dbb151b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
#
# Runs every hook in pre-commit.d/ until the first failure
#

hook_directory=$(realpath $(dirname $0))

for hook in ${hook_directory}/pre-commit.d/* ; do
	if [ -x "${hook}" ] ; then
		${hook}
		if [ $? -ne 0 ] ; then
			exit 1
		fi
	fi
done