From cb32a49b5b77b1f8358cd6c14e61f92b99492107 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 14 Oct 2016 06:50:17 +0200 Subject: [PATCH] generate man page output file mappings automatically --- Makefile | 1 + scan-adoc-refs | 33 +++++++-------------------------- 2 files changed, 8 insertions(+), 26 deletions(-) diff --git a/Makefile b/Makefile index db7c949..3017b2a 100644 --- a/Makefile +++ b/Makefile @@ -180,6 +180,7 @@ WIKI_IMPORTS= \ pve-usbstick-plain.html \ getting-help-plain.html \ pve-system-requirements-plain.html \ + system-timesync-plain.html \ $(addsuffix -plain.html, ${SYSADMIN_PARTS}) \ $(addsuffix -plain.html, ${CHAPTER_LIST}) \ $(addsuffix .5-plain.html, ${CONFIG_LIST}) \ diff --git a/scan-adoc-refs b/scan-adoc-refs index 03dc51c..13e6ae0 100755 --- a/scan-adoc-refs +++ b/scan-adoc-refs @@ -33,31 +33,6 @@ my $fileinfo = { "pmxcfs.adoc" => "chapter-pmxcfs.html", "pve-faq.adoc" => "chapter-pve-faq.html", }, - manvolnum => { - "ha-manager.adoc" => "ha-manager.1", - "pct.adoc" => "pct.1", - "pveam.adoc" => "pveam.1", - "pveceph.adoc" => "pveceph.1", - "pvecm.adoc" => "pvecm.1", - "pveperf.adoc" => "pveperf.1", - "pvesm.adoc" => "pvesm.1", - "pvesubscription.adoc" => "pvesubscription.1", - "pveum.adoc" => "pveum.1", - "qm.adoc" => "qm.1", - "qmrestore.adoc" => "qmrestore.1", - "vzdump.adoc" => "vzdump.1", - "datacenter.cfg.adoc" => "datacenter.cfg.5", - "pct.conf.adoc" => "pct.conf.5", - "qm.conf.adoc" => "qm.conf.5", - "pmxcfs.adoc" => "pmxcfs.8", - "pvedaemon.adoc" => "pvedaemon.8", - "pve-firewall.adoc" => "pve-firewall.8", - "pve-ha-crm.adoc" => "pve-ha-crm.8", - "pve-ha-lrm.adoc" => "pve-ha-lrm.8", - "pveproxy.adoc" => "pveproxy.8", - "pvestatd.adoc" => "pvestatd.8", - "spiceproxy.adoc" => "spiceproxy.8", - }, }, }; @@ -311,7 +286,13 @@ foreach my $e (@$start_env) { if (defined($mansection) && ($mansection == 5)) { $realfn .= ".$mansection"; } - my $realfn = "$realfn-plain.html"; + $realfn = "$realfn-plain.html"; + $fileinfo->{outfile}->{$e}->{$fn} = $realfn; + } elsif ($e eq 'manvolnum') { + my $realfn = $fn; + $realfn =~ s/\.adoc$//; + die "toplevel file '$fn' is marhes as manual page!" if !$mansection; + $realfn .= ".$mansection"; $fileinfo->{outfile}->{$e}->{$fn} = $realfn; } } -- 2.39.2