]>
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 | ||
f1e9e804 DDM |
13 | ret=2 |
14 | ||
15 | if [ -f .git/hooks/pre-commit.sample ] && [ ! -f .git/hooks/pre-commit ]; then | |
16 | cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit | |
17 | chmod +x .git/hooks/pre-commit | |
18 | echo 'Activated pre-commit hook' | |
19 | ret=0 | |
20 | fi | |
21 | ||
22 | if [ ! -f .git/hooks/post-rewrite ]; then | |
23 | cp -p tools/git-post-rewrite-hook.sh .git/hooks/post-rewrite | |
24 | echo 'Activated post-rewrite hook' | |
25 | ret=0 | |
003c8879 ZJS |
26 | fi |
27 | ||
f1e9e804 | 28 | exit $ret |