diff options
author | Xiang, Haihao <haihao.xiang@intel.com> | 2017-03-24 09:13:24 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2017-04-07 16:32:33 +0800 |
commit | 2f0a8449f37b978eb202082b9113039b00c6931a (patch) | |
tree | 06333d75b6058f6ee64918ddbf1b52398dc72f09 /autogen.sh | |
parent | 85d5aa7602fcc5e0561f93eff155353cbf903816 (diff) | |
download | libva-intel-driver-2f0a8449f37b978eb202082b9113039b00c6931a.tar.gz |
Add pre-commit hook
Check that the code follows a consistant coding style before committing.
The current command will be interrupted if the commit doesn't follow the
code style
This fixes https://github.com/01org/intel-vaapi-driver/issues/99
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -6,6 +6,15 @@ test -z "$srcdir" && srcdir=. ORIGDIR=`pwd` cd "$srcdir" +# install pre-commit hook +SRC_PRE_COMMIT=hooks/pre-commit.hook +GIT_PRE_COMMIT=.git/hooks/pre-commit + +if [ ! \( -x $GIT_PRE_COMMIT -a -L $GIT_PRE_COMMIT \) ]; then + rm -f $GIT_PRE_COMMIT + ln -s ../../$SRC_PRE_COMMIT $GIT_PRE_COMMIT +fi + autoreconf -v --install || exit 1 cd $ORIGDIR || exit $? |