my $fileinfo = decode_json($data_str);
-my $tmpprefix = ".asciidoc-pve-tmp_";
+my $tmpprefix = '.asciidoc-pve-tmp'.$$.'_';
my $adoc_source_dir = "/usr/share/pve-doc-generator";
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') {
$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 = {
leveloffset => $leveloffset,
revnumber => $release,
revdate => $date,
+ 'footer-style' => 'revdate',
};
my $mansection = $fileinfo->{mansection}->{$env}->{$infile};