x-git-hooks 0.0.1

Git Hooks Manager
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

set -eu

readonly hooks_path=$(git config --get core.hooksPath)
readonly hook_name=$(basename "$0")
readonly scripts_path="./${hooks_path}/.${hook_name}"
readonly git_params=$*

echo "[git-hooks] running hook   : ${hook_name}"

for script in ${scripts_path}/*; do
  ${script} ${git_params}
done