2 # SPDX-License-Identifier: LGPL-2.1-or-later
5 cd "${MESON_SOURCE_ROOT:?}"
8 git config submodule.recurse true
9 git config fetch.recurseSubmodules on-demand
10 git config push.recurseSubmodules no
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'
22 if [ ! -f .git
/hooks
/post-rewrite
]; then
23 cp -p tools
/git-submodule-update-hook.sh .git
/hooks
/post-rewrite
24 echo 'Activated post-rewrite hook'
28 if [ ! -f .git
/hooks
/post-checkout
]; then
29 cp -p tools
/git-submodule-update-hook.sh .git
/hooks
/post-checkout
30 echo 'Activated post-checkout hook'