]> git.ipfire.org Git - thirdparty/systemd.git/blob - tools/add-git-hook.sh
final v236 update (#7649)
[thirdparty/systemd.git] / tools / add-git-hook.sh
1 #!/bin/sh -eu
2
3 cd "$MESON_SOURCE_ROOT"
4
5 if [ ! -f .git/hooks/pre-commit.sample -o -f .git/hooks/pre-commit ]; then
6 exit 2 # not needed
7 fi
8
9 cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit
10 chmod +x .git/hooks/pre-commit
11 echo 'Activated pre-commit hook'