chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
final touches to NEWS
[elogind.git]
/
tools
/
add-git-hook.sh
1
#!/bin/sh
2
set -eu
3
4
cd "$MESON_SOURCE_ROOT"
5
6
if [ ! -f .git/hooks/pre-commit.sample -o -f .git/hooks/pre-commit ]; then
7
exit 2 # not needed
8
fi
9
10
cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit
11
chmod +x .git/hooks/pre-commit
12
echo 'Activated pre-commit hook'