blob: 4b195f5184c6521a390a7427989ba72424f06f3a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#!/bin/bash
set -e
cd
IFS=''
find . -not -path '*/.*' -path '*.git' -type d |
while read -r git_dir; do
mkdir -p -- "${git_dir}/hooks"
find "${git_dir}/hooks" \( -name '*.sample' -o -type l \) -delete
if ! [[ -f "${git_dir}/hooks/post-receive" ]]; then
ln -srv git-hooks/post-receive.agefile "${git_dir}/hooks/post-receive"
fi
done
|