mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-22 09:57:41 +00:00
24 lines
543 B
Bash
Executable File
24 lines
543 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# This script install user-side git commit hooks. You are supposed to run it
|
|
# only once for each repo (and very infrequently afterwards, once each time
|
|
# the git hooks change).
|
|
|
|
if test -d .git; then
|
|
TOPDIR=.
|
|
else
|
|
TOPDIR=..
|
|
fi
|
|
|
|
GITDIR=${TOPDIR}/.git
|
|
|
|
if test ! -d ${GITDIR}; then
|
|
echo "ERROR: Could not find ${GITDIR} in ${TOPDIR}"
|
|
exit -1
|
|
fi
|
|
|
|
echo "Installing hooks in ${GITDIR}/hooks"
|
|
mkdir -p ${GITDIR}/hooks
|
|
cp ${TOPDIR}/tools/git-hooks/prepare-commit-msg ${GITDIR}/hooks
|
|
chmod u+x ${GITDIR}/hooks/prepare-commit-msg
|