X-Git-Url: https://git.proxmox.com/?p=pve-docs.git;a=blobdiff_plain;f=asciidoc-pve.in;h=83a6c5c33f9d42872041936205702b0f554d5694;hp=8550bac19327bc52ef06c39f282ec7d9ac5534d9;hb=d2b02c4d0e00a288042a0d85f3364820c3f82ca0;hpb=110ebe8fe1fc1bfc6b28428e1c310704313819d2 diff --git a/asciidoc-pve.in b/asciidoc-pve.in index 8550bac..83a6c5c 100644 --- a/asciidoc-pve.in +++ b/asciidoc-pve.in @@ -28,8 +28,8 @@ my $tmpprefix = ".asciidoc-pve-tmp_"; my $adoc_source_dir = "/usr/share/pve-doc-generator"; # inside pve-docs source dir? -if (-f "attributes.txt" && -f "pve-admin-guide.adoc") { - $adoc_source_dir = "." +if (-f "asciidoc-pve.in" && -f "pve-admin-guide.adoc") { + $adoc_source_dir = getcwd(); } my $prepared_files = {}; @@ -341,7 +341,9 @@ sub compile_asciidoc { # section like footnotes, so we cannot use a2x. # We use xmlto instead. - my $cmd = ['asciidoc', '-dmanpage', '-bdocbook', '-a', 'docinfo1']; + my $cmd = ['asciidoc', '-dmanpage', '-bdocbook', + '-f', "$adoc_source_dir/asciidoc/asciidoc-pve.conf", + '-a', 'docinfo1']; foreach my $key (keys %$attributes) { my $value = $attributes->{$key}; @@ -383,17 +385,16 @@ sub compile_asciidoc { $attributes->{icons} = undef; $attributes->{'data-uri'} = undef; - my $cmd = ['asciidoc']; + my $cmd = ['asciidoc', + '-f', "$adoc_source_dir/asciidoc/asciidoc-pve.conf", + ]; if (($env eq 'wiki') || (($env eq 'manvolnum') && ($man_target eq 'wiki'))) { - if (-f "./asciidoc/mediawiki.conf") { - my $cwd = getcwd(); - push @$cmd, '-b', "$cwd/asciidoc/mediawiki"; - } else { - push @$cmd, '-b', "mediawiki"; - } + push @$cmd, '-b', "$adoc_source_dir/asciidoc/mediawiki"; + } else { + push @$cmd, '-b', "$adoc_source_dir/asciidoc/pve-html"; } foreach my $key (keys %$attributes) {