]> git.proxmox.com Git - pve-docs.git/blobdiff - asciidoc-pve.in
use fixed output file mapping
[pve-docs.git] / asciidoc-pve.in
index e7a6afba049d8834eb438133cb2ed347149f56b3..97c5bf2315e5feb64801e5dbe61b9673ba64ecfa 100644 (file)
@@ -260,6 +260,18 @@ sub compile_asciidoc {
     scalar(@ARGV) == 0 or
        die "too many arguments...\n";
 
+    my $outfilemap = $fileinfo->{outfile}->{$env}->{$infile} ||
+       die "no output file mapping '$infile => $outfile' ($env)";
+
+    if ($man_target eq 'html') {
+       $outfilemap .= '.html';
+    } elsif ($man_target eq 'wiki') {
+       $outfilemap .= '-plain.html';
+    }
+
+    die "wrong output file name '$outfile != $outfilemap' ($env)"
+       if $outfile ne $outfilemap;
+
     defined($fileinfo->{titles}->{$env}) ||
        die "unknown environment '$env'";