]> git.ipfire.org Git - thirdparty/systemd.git/blame - tools/git-setup.sh
docs: Add one more git submodule setting to configure
[thirdparty/systemd.git] / tools / git-setup.sh
CommitLineData
7629744a 1#!/bin/sh
9ee03516 2# SPDX-License-Identifier: LGPL-2.1-or-later
7629744a 3set -eu
003c8879 4
3b6fd3c1 5cd "${MESON_SOURCE_ROOT:?}"
003c8879 6
6233a769
DDM
7if [ -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
11fi
12
3b6fd3c1 13if [ ! -f .git/hooks/pre-commit.sample ] || [ -f .git/hooks/pre-commit ]; then
cc5549ca 14 exit 2 # not needed
003c8879
ZJS
15fi
16
17cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit
18chmod +x .git/hooks/pre-commit
19echo 'Activated pre-commit hook'