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