mirror of
https://github.com/c9moser/sgbackup.git
synced 2026-01-19 11:30:13 +00:00
18 lines
428 B
Bash
Executable File
18 lines
428 B
Bash
Executable File
#!/bin/sh
|
|
# vim: syn=sh ts=4 sts=4 sw=4 smartindent expandtab ff=unix
|
|
|
|
SELF="$(realpath $0)"
|
|
GITHOOKS_DIR="$(dirname "$SELF")" ; export GITHOOKS_DIR
|
|
PROJECT_ROOT="$(dirname "$(dirname "$SELF")")" ; export PROJECT_ROOT
|
|
|
|
pre_commit_d="${GITHOOKS_DIR}/pre-commit-d"
|
|
|
|
# run scripts from the pre-commit.d directory
|
|
for i in $(ls "$pre_commit_d"); do
|
|
script="${pre_commit_d}/$i"
|
|
if [ -x "$script" ]; then
|
|
"$script" "$@"
|
|
fi
|
|
done
|
|
|