From: Dietmar Maurer Date: Fri, 21 Oct 2016 09:25:59 +0000 (+0200) Subject: asciidoc-pve.in: fix warning about undefined value X-Git-Url: https://git.proxmox.com/?p=pve-docs.git;a=commitdiff_plain;h=dc7c3dd9e3b8712641b1381ac138c7ae70ba72e7 asciidoc-pve.in: fix warning about undefined value --- diff --git a/asciidoc-pve.in b/asciidoc-pve.in index b8a9fb2..92b0ca2 100644 --- a/asciidoc-pve.in +++ b/asciidoc-pve.in @@ -268,7 +268,7 @@ sub compile_asciidoc { die "too many arguments...\n"; my $outfilemap = $fileinfo->{outfile}->{$env}->{$infile} || - die "no output file mapping '$infile => $outfile' ($env)"; + die "no output file mapping for '$infile' ($env)"; if ($man_target eq 'html') { $outfilemap .= '.html'; @@ -276,8 +276,12 @@ sub compile_asciidoc { $outfilemap .= '-plain.html'; } - die "wrong output file name '$outfile != $outfilemap' ($env)" - if $outfile ne $outfilemap; + if (defined($outfile)) { + die "wrong output file name '$outfile != $outfilemap' ($env)" + if $outfile ne $outfilemap; + } else { + $outfile = $outfilemap; + } defined($fileinfo->{titles}->{$env}) || die "unknown environment '$env'";