From bb60528e73ed611553befba2ea1bdf8c690a26e5 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Sun, 5 Jun 2011 15:15:49 +0200 Subject: [PATCH] Add "gitconfig" make target to simplify gerrit configuration "make gitconfig" installs the gerrit commit-msg hook and validates that user.name and user.email are configured. No data will be overwritten. Change-Id: I49ec98538574866e7ad6238ff3d02b9c1beef1bb Reviewed-on: http://review.coreboot.org/2 Tested-by: build bot (Jenkins) Reviewed-by: Peter Stuge --- Makefile.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile.inc b/Makefile.inc index f8c4deb2ac..72a3b55017 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -231,6 +231,10 @@ lint: test $$FAILED -eq 0 || { echo "ERROR: $$FAILED test(s) failed." && exit 1; }; \ rm -f $$LINTLOG +gitconfig: + if ! [ -x .git/hooks/commit-msg ]; then wget -O .git/hooks/commit-msg http://review.coreboot.org/tools/hooks/commit-msg; chmod +x .git/hooks/commit-msg; fi + (git config --global user.name >/dev/null && git config --global user.email >/dev/null) || (printf 'Please configure your name and email in git:\n\n git config --global user.name "Your Name Comes Here"\n git config --global user.email your.email@example.com\n'; exit 1) + crossgcc: clean-for-update $(MAKE) -C util/crossgcc build