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