1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-09-25 15:41:41 +02:00

Add autogen.sh magic to install git hooks.

This commit is contained in:
Werner Koch 2011-02-04 20:45:41 +01:00
parent cb2f55e9ed
commit 61b7c3743f
2 changed files with 56 additions and 30 deletions

View File

@ -1,3 +1,8 @@
2011-02-04 Werner Koch <wk@g10code.com>
* autogen.sh: Ensure that the git pre-commit hoom has been
enabled. Add a cleanpo filter if not yet set.
2011-01-13 Werner Koch <wk@g10code.com> 2011-01-13 Werner Koch <wk@g10code.com>
Release 2.0.17. Release 2.0.17.
@ -1186,5 +1191,3 @@
This file is distributed in the hope that it will be useful, but This file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

View File

@ -199,6 +199,29 @@ EOF
fi fi
# Check the git setup.
if [ -d .git ]; then
if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
cat <<EOF >&2
*** Activating trailing whitespace git pre-commit hook. ***
For more information see this thread:
http://mail.gnome.org/archives/desktop-devel-list/2009-May/msg00084html
To deactivate this pre-commit hook again move .git/hooks/pre-commit
and .git/hooks/pre-commit.sample out of the way.
EOF
cp -av .git/hooks/pre-commit.sample .git/hooks/pre-commit
chmod -c +x .git/hooks/pre-commit
fi
tmp=$(git config --get filter.cleanpo.clean)
if [ "$tmp" != "awk '/^\"POT-Creation-Date:/&&!s{s=1;next};!/^#: /{print}'" ]
then
echo "*** Adding GIT filter.cleanpo.clean configuration." >&2
git config --add filter.cleanpo.clean \
"awk '/^\"POT-Creation-Date:/&&!s{s=1;next};!/^#: /{print}'"
fi
fi
echo "Running aclocal -I m4 -I gl/m4 ${ACLOCAL_FLAGS:+$ACLOCAL_FLAGS }..." echo "Running aclocal -I m4 -I gl/m4 ${ACLOCAL_FLAGS:+$ACLOCAL_FLAGS }..."
$ACLOCAL -I m4 -I gl/m4 $ACLOCAL_FLAGS $ACLOCAL -I m4 -I gl/m4 $ACLOCAL_FLAGS
echo "Running autoheader..." echo "Running autoheader..."