]>
Commit | Line | Data |
---|---|---|
7629744a | 1 | #!/bin/sh |
9ee03516 | 2 | # SPDX-License-Identifier: LGPL-2.1-or-later |
7629744a | 3 | set -eu |
003c8879 | 4 | |
3b6fd3c1 | 5 | cd "${MESON_SOURCE_ROOT:?}" |
003c8879 | 6 | |
6233a769 DDM |
7 | if [ -e .git ]; then |
8 | git config submodule.recurse true | |
9 | git config fetch.recurseSubmodules on-demand | |
e33d43b0 | 10 | git config push.recurseSubmodules no |
6233a769 DDM |
11 | fi |
12 | ||
3b6fd3c1 | 13 | if [ ! -f .git/hooks/pre-commit.sample ] || [ -f .git/hooks/pre-commit ]; then |
cc5549ca | 14 | exit 2 # not needed |
003c8879 ZJS |
15 | fi |
16 | ||
17 | cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit | |
18 | chmod +x .git/hooks/pre-commit | |
19 | echo 'Activated pre-commit hook' |