]> git.ipfire.org Git - thirdparty/systemd.git/blob - tools/git-setup.sh
b5903b4ca1005f2de9a90105becc63690143f6b1
[thirdparty/systemd.git] / tools / git-setup.sh
1 #!/bin/sh
2 # SPDX-License-Identifier: LGPL-2.1-or-later
3 set -eu
4
5 cd "${MESON_SOURCE_ROOT:?}"
6
7 ret=2
8
9 if [ -f .git/hooks/pre-commit.sample ] && [ ! -f .git/hooks/pre-commit ]; then
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'
13 ret=0
14 fi
15
16 exit $ret