From 41e7df45e64f623499b8d286a4012e6e7d24eaf6 Mon Sep 17 00:00:00 2001 From: "Richard J. Knight" Date: Fri, 13 Oct 2017 15:49:25 -0500 Subject: Initial hcode commit Change-Id: I2c6c9b05c6afbd7732f472ea9cf049d00c5cad45 --- tools/hooks/pre-commit | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 tools/hooks/pre-commit (limited to 'tools/hooks/pre-commit') diff --git a/tools/hooks/pre-commit b/tools/hooks/pre-commit new file mode 100755 index 00000000..04ad9a81 --- /dev/null +++ b/tools/hooks/pre-commit @@ -0,0 +1,36 @@ +#!/bin/bash +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: tools/hooks/pre-commit $ +# +# OpenPOWER HCODE Project +# +# COPYRIGHT 2015,2017 +# [+] 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. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. See the License for the specific language governing +# permissions and limitations under the License. +# +# IBM_PROLOG_END_TAG + +if [ -z $EKBHOOKSDIR ]; then + echo Error: environment not setup properly... + echo "Run 'source env.bash' or './ekb workon' based on your current environment" + echo "For more info run './ekb --help'" + exit -1 +fi + +if [ -z $DISABLEHOOKS ] && [ -z $MIRROR ]; then + $EKBHOOKSDIR/tools/pre-commit-actions +fi -- cgit v1.2.3