From 4ae690e4eeb9297ed59ff932cc4184d23896234d Mon Sep 17 00:00:00 2001 From: Stephen Cprek Date: Mon, 27 Apr 2015 15:02:25 -0500 Subject: Generalize env vars, env setup, and copyright scripts Methods ported over from code in EKB. Change-Id: I26b6f2326314936b0316f64272230730ecd3f9ee RTC: 126634 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/17465 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: A. Patrick Williams III --- src/build/tools/setupgithooks.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/build/tools/setupgithooks.sh') diff --git a/src/build/tools/setupgithooks.sh b/src/build/tools/setupgithooks.sh index cde55518a..707286e6e 100755 --- a/src/build/tools/setupgithooks.sh +++ b/src/build/tools/setupgithooks.sh @@ -6,7 +6,9 @@ # # OpenPOWER HostBoot Project # -# COPYRIGHT International Business Machines Corp. 2011,2014 +# Contributors Listed Below - COPYRIGHT 2011,2015 +# [+] International Business Machines Corp. +# # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -25,11 +27,6 @@ # Each developer runs this from the git_repo base dir, where it will copy the # needed scripts into .git/hooks/ directory and make them executable. -# Setup some global variables -HOOKSDIR=$HOSTBOOTROOT/.git/hooks -TOOLSDIR=$HOSTBOOTROOT/src/build/tools -HB_SRV=hostboot.gerrit - if [ -d $HOOKSDIR ] then @@ -37,11 +34,12 @@ then if [ ! -f $HOOKSDIR/commit-msg ] then echo "Copying Gerrit hooks..." - scp -p -q $HB_SRV:hooks/commit-msg $HOOKSDIR + scp -p -q $GERRIT_SRV:hooks/commit-msg $HOOKSDIR fi # Copy custom pre/post commit hooks from tools directory. - if [ -f "$TOOLSDIR/pre-commit" -a -f "$TOOLSDIR/post-commit" ] + if [ -f "$TOOLSDIR/pre-commit" -a \ + -f "$TOOLSDIR/post-commit" ] then echo "Copying pre/post commit hooks..." -- cgit v1.2.1