On Mon, Jul 09, 2012 at 08:16:37PM +0200, Hilko Bengen wrote:
---
podwrapper.sh.in | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/podwrapper.sh.in b/podwrapper.sh.in
index ec750f1..0a84d13 100755
--- a/podwrapper.sh.in
+++ b/podwrapper.sh.in
@@ -53,6 +53,9 @@ if [ -z "$abs_top_builddir" ]; then
exit 1
fi
+DATE=`awk '/^[0-9]+-[0-9]+-[0-9]+/ { print $1; exit }' \
+ $abs_top_srcdir/ChangeLog`
+
declare -a inserts
declare -a pattern
declare -a indent
@@ -167,6 +170,7 @@ fi
# Now generate the final output format(s).
if [ -n "$man_output" ]; then
"$POD2MAN" "$POD2_STDERR_OPTION" "$POD2_UTF8_OPTION"
\
+ --date $DATE \
--section "$section" -c "Virtualization Support" --name
"$name" \
--release "$PACKAGE_NAME-$PACKAGE_VERSION" \
< $tmpdir/full.pod > "$man_output".tmp
--
1.7.10.4
Looks good, except unfortunately 'ChangeLog' isn't included in git so
this would fail for people who check out from git and try to compile.
I'm not sure what the best solution for that would be. Perhaps:
(1) include ChangeLog in git?
(2) In the 'make dist' rule, write a 'date' file and use that here?
Only 'date' would have to be included in git.
(3) Make the 'DATE' calculation detect this and use the current date
instead?
Something else?
I think I'm favouring option (2) at the moment.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming blog:
http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora