Files
mckernel/scripts/git_hooks/install_git_hooks.sh
Dominique Martinet e770a22fa5 scripts: add checkpatch.pl & git hooks
Change-Id: I29e5f7a99e8dd92511c0b1d099f3e1a2f37d7a72
2018-07-12 00:55:58 +00:00

13 lines
260 B
Bash
Executable File

#!/bin/sh
CURDIR=$(dirname "$(readlink -m "$0")")
TOPDIR=$(git rev-parse --show-toplevel)
HOOKDIR=$TOPDIR/.git/hooks
cp -f "$CURDIR/pre-commit" "$HOOKDIR"
chmod +x "$HOOKDIR/pre-commit"
cp -f "$CURDIR/commit-msg" "$HOOKDIR"
chmod +x "$HOOKDIR/commit-msg"