mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-18 14:17:03 +01:00
Let autogen.sh check the git config
To avoid checking in trailing scripts the autogen.sh script now enables the standard pre-commit hook, which check for this. Add a cleanpo filter if not yet set. This works with together with po/.gitattributes.
This commit is contained in:
parent
cd9614b81b
commit
ffd099eb19
@ -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-02-03 Werner Koch <wk@g10code.com>
|
2011-02-03 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* configure.ac (HAVE_GCRY_PK_GET_CURVE): Use AC_TRY_LINK.
|
* configure.ac (HAVE_GCRY_PK_GET_CURVE): Use AC_TRY_LINK.
|
||||||
|
21
autogen.sh
21
autogen.sh
@ -256,6 +256,27 @@ EOF
|
|||||||
exit 1
|
exit 1
|
||||||
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user