]>
Commit | Line | Data |
---|---|---|
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 |