[RFC/PATCH] Print git describe output into the log file.

Fernando Carrijo fcarrijo at yahoo.com.br
Tue Apr 13 19:24:32 PDT 2010


Peter Hutterer <peter.hutterer at who-t.net> wrote:
> diff --git a/GIT-GENERATE-VERSION b/GIT-GENERATE-VERSION
> new file mode 100755
> index 0000000..6872a76
> --- /dev/null
> +++ b/GIT-GENERATE-VERSION
> @@ -0,0 +1,24 @@
> +#!/bin/sh
> +# Get the git version if possible and store it in $GITFILE if it differs to
> +# the one contained already.
> +
> +GITFILE="xorg-git-version.h"
> +
> +if ! which git > /dev/null; then
> +    VER="Git not available."
> +else
> +    VER=`git describe HEAD 2>/dev/null`
> +
> +    if test $? -ne 0; then
> +        VER="Unknown version or not build from git."
> +    fi
> +fi
> +
> +if test -e "$GITFILE"; then
> +    FILE_VER=$(sed -e "s/^#define XORG_GIT_VERSION //" < $GITFILE)

In the above line, maybe use backticks instead?



More information about the xorg-devel mailing list