9 Jul
2012
9 Jul
'12
10 p.m.
* 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