using util-eng to install git hooks

This commit is contained in:
Nathan Stilwell 2014-03-27 14:24:31 -04:00
commit 7192b9707b

View file

@ -85,15 +85,16 @@ function gerrit_add_reviewer {
} }
function gerrit_setup () { function gerrit_setup () {
cd .git/hooks; if [ -d /web/tools/bin/install-hooks ]; then
scp gerrit_host:hooks/commit-msg . > /dev/null; # install hooks
cd - > /dev/null; /web/tools/bin/install-hooks;
if [[ $? -eq 0 ]]; then if [[ $? -eq 0 ]]; then
echo "$green Gerrit hook installed. $stop"; echo "$green Gerrit hook installed. $stop";
else else
echo "$red Couldn't install Gerrit hook. $stop"; echo "$red Couldn't install Gerrit hook. $stop";
fi fi
fi
} }
function gerrit () { function gerrit () {