diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2007-02-27 15:18:42 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2007-02-27 15:18:42 +0000 |
commit | 46c11ef014305fc69cef9a652783150007072414 (patch) | |
tree | dfd536d276eb8a41165a2e878c6c9992c2ad414d /devtools | |
parent | 45002667d028e9bf5e0104491d68af35dc50ecc6 (diff) | |
download | MPC-46c11ef014305fc69cef9a652783150007072414.tar.gz |
ChangeLogTag: Tue Feb 27 15:17:35 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'devtools')
-rwxr-xr-x | devtools/document_template.pl | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/devtools/document_template.pl b/devtools/document_template.pl index 21ce5e99..b2b8aeb5 100755 --- a/devtools/document_template.pl +++ b/devtools/document_template.pl @@ -238,7 +238,7 @@ if (open($fh, $input)) { elsif ($name eq 'if') { $vname =~ s/(!|&&|\|\|)//g; foreach my $keyword (keys %keywords) { - $vname =~ s/$keyword\(.*\)//g; + $vname =~ s/$keyword\(.*[\)]?//g; } if ($vname !~ /^\s*$/) { $name = lc($vname); @@ -322,10 +322,17 @@ if (open($fh, $input)) { close($fh); my($cp) = new ConfigParser(); - my($doc) = basename($input); - $doc =~ s/\.[^\.]+$/$doc_ext/; $cp->read_file("$basePath/docs/templates/common$doc_ext"); - $cp->read_file("$basePath/docs/templates/$doc"); + + my($doc) = $input; + $doc =~ s/\.[^\.]+$/$doc_ext/; + $doc =~ s/templates/docs\/templates/; + if (-r $doc) { + $cp->read_file($doc); + } + else { + $cp->read_file("$basePath/docs/templates/" . basename($doc)); + } if (open($fh, ">$output")) { display_template($fh, $cp, $input, \%template_keys); |