[Libguestfs] [PATCH] podwrapper.sh: Use date from ChangeLog

Hilko Bengen bengen at hilluzination.de
Mon Jul 9 22:00:58 UTC 2012


* Richard W.M. Jones:

> On Mon, Jul 09, 2012 at 08:57:15PM +0100, Richard W.M. Jones wrote:
>> (2) In the 'make dist' rule, write a 'date' file and use that here?
>> Only 'date' would have to be included in git.
>
> This could be useful:
>
> $ git show -s --format=%ci $(git rev-parse HEAD)
> 2012-07-08 12:55:44 +0100

What is git rev-parse HEAD needed for?

How about something like this?

if [ -e $abs_top_srcdir/ChangeLog ]; then
    DATEPARAM=`awk '/^[0-9]+-[0-9]+-[0-9]+/ { print "--date=" $1; exit }' \
        $abs_top_srcdir/ChangeLog`
else if [ -d $abs_top_srcdir/.git ]; then
    DATEPARAM=`git show -s --format=%ci | awk '{print "--date=" $1}'`
fi

(If $DATEPARAM is not set, pod2man would fall back to its current
behavior.)

-Hilko




More information about the Libguestfs mailing list