]> git.ipfire.org Git - thirdparty/systemd.git/blob - tools/add-git-hook.sh
Merge pull request #18007 from fw-strlen/ipv6_masq_and_dnat
[thirdparty/systemd.git] / tools / add-git-hook.sh
1 #!/bin/sh
2 # SPDX-License-Identifier: LGPL-2.1-or-later
3 set -eu
4
5 cd "$MESON_SOURCE_ROOT"
6
7 if [ ! -f .git/hooks/pre-commit.sample -o -f .git/hooks/pre-commit ]; then
8 exit 2 # not needed
9 fi
10
11 cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit
12 chmod +x .git/hooks/pre-commit
13 echo 'Activated pre-commit hook'