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

Richard W.M. Jones rjones at redhat.com
Mon Jul 9 23:23:22 UTC 2012


On Tue, Jul 10, 2012 at 12:00:58AM +0200, Hilko Bengen wrote:
> * 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?

Hmmm, thinko :-)

> 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.)

Looks good.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw




More information about the Libguestfs mailing list