File: git-setup.sh

package info (click to toggle)
systemd 257.8-1~deb13u2
  • links: PTS, VCS
  • area: main
  • in suites: trixie-updates
  • size: 99,552 kB
  • sloc: ansic: 685,801; xml: 115,673; python: 35,289; sh: 30,144; makefile: 271; awk: 99; lisp: 13; sed: 1
file content (16 lines) | stat: -rwxr-xr-x 336 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eu

cd "${MESON_SOURCE_ROOT:?}"

ret=2

if [ -f .git/hooks/pre-commit.sample ] && [ ! -f .git/hooks/pre-commit ]; then
    cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit
    chmod +x .git/hooks/pre-commit
    echo 'Activated pre-commit hook'
    ret=0
fi

exit $ret