1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-29 08:21:11 +03:00

Allow documentation source file to be specified in manifest.

The help source file had previously been hardcoded and now that is no longer needed.

A future commit will introduce more sources outside of the xml path.
This commit is contained in:
David Steele
2023-09-29 17:06:37 -04:00
parent 55fda01733
commit 088026e6ff
3 changed files with 7 additions and 4 deletions

View File

@ -104,12 +104,14 @@ sub new
{
my $oSourceHash = {};
my $strKey = $oSource->paramGet('key');
my $strFile = $oSource->paramGet('file', false);
my $strSourceType = $oSource->paramGet('type', false);
logDebugMisc
(
$strOperation, 'load source',
{name => 'strKey', value => $strKey},
{name => 'strFile', value => $strFile},
{name => 'strSourceType', value => $strSourceType}
);
@ -119,10 +121,10 @@ sub new
next;
}
# Help is in src/build/help
if ($strKey eq 'help')
# If file is defined
if (defined($strFile))
{
$oSourceHash->{doc} = new pgBackRestDoc::Common::Doc("$self->{strDocPath}/../src/build/help/${strKey}.xml");
$oSourceHash->{doc} = new pgBackRestDoc::Common::Doc($self->{strDocPath} . "/${strFile}");
}
# Else should be in doc/xml
else