X-Git-Url: https://git.proxmox.com/?p=pve-docs.git;a=blobdiff_plain;f=asciidoc-pve.in;h=d1a754d5a0f5034d15e4f95a4287d4065b12c1c8;hp=83f59ebb383cd4558ab0bebcb32e4b2811c62d6e;hb=a45c999b4586734621bbc968d67f87390739b270;hpb=2f0886ca0c0af2dd1ff629e603009e1efd4b20c2 diff --git a/asciidoc-pve.in b/asciidoc-pve.in index 83f59eb..d1a754d 100644 --- a/asciidoc-pve.in +++ b/asciidoc-pve.in @@ -146,7 +146,10 @@ sub replace_man_xref { die "xref: no text for man page link '$blockid'\n" if !$text; my $section = $fileinfo->{mansection}->{manvolnum}->{$link}; - die "link target is not a manual page" if !defined($section); + if (!defined($section)) { + warn "link '$blockid' target '$link' is not a manual page, ignoring\n"; + return "$text"; + } if ($man_target eq 'html') { @@ -300,7 +303,12 @@ sub compile_asciidoc { $leveloffset = - $doctype; - my $date = `date`; + my $date; + if (defined($ENV{SOURCE_DATE_EPOCH})) { + $date = `date -d "\@$ENV{SOURCE_DATE_EPOCH}"`; + } else { + $date = `date`; + } chomp $date; my $attributes = { @@ -308,6 +316,7 @@ sub compile_asciidoc { leveloffset => $leveloffset, revnumber => $release, revdate => $date, + 'footer-style' => 'revdate', }; my $mansection = $fileinfo->{mansection}->{$env}->{$infile};