blob: 90c3480734982387c9675256ed1af7385f643b5d [file] [log] [blame]
#! /usr/bin/env sh
#git config --add hook.pre-commit.command `realpath
dir=`realpath $(dirname "$BASH_SOURCE:-0")`
# Space separated list of hooks to install
declare -a HOOKS=("pre-commit" "commit-msg")
for hook in ${HOOKS[@]}; do
if [ ! -f "${dir}/${hook}" ]; then
continue
fi
git config --add hook.${hook}.command "${dir}/${hook}"
git list hook "${hook}"
done