X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=makeDist;h=fc16eef86f4402e44e60e9131ae833b18072bb2a;hp=a0e454f9195e2045408f47655db01f0865d700e5;hb=dcb39df8e33e09eabfb4eae471c2e6447094d0e2;hpb=27f513f89d885d24bf1a01242fba676c7a840fd5 diff --git a/makeDist b/makeDist index a0e454f..fc16eef 100755 --- a/makeDist +++ b/makeDist @@ -92,6 +92,7 @@ my @PerlSrc = qw( lib/BackupPC/CGI/RestoreFile.pm lib/BackupPC/CGI/RestoreInfo.pm lib/BackupPC/CGI/Restore.pm + lib/BackupPC/CGI/RSS.pm lib/BackupPC/CGI/StartServer.pm lib/BackupPC/CGI/StartStopBackup.pm lib/BackupPC/CGI/StopServer.pm @@ -133,6 +134,10 @@ $errCnt += CheckConfigParams("conf/config.pl", $ConfVars, 0); $errCnt += CheckConfigParams("doc-src/BackupPC.pod", $ConfVars, 1); +$errCnt += CheckMetaDataVsConfig($ConfVars, "lib/BackupPC/Config/Meta.pm"); + +$errCnt += CheckEditorVsConfig($ConfVars, "lib/BackupPC/CGI/EditConfig.pm"); + # # These config parameters are not used in the code, so ignore them. # @@ -402,6 +407,68 @@ sub CheckConfigParams return $errors; } +sub CheckMetaDataVsConfig +{ + my($confVars, $file) = @_; + my $done = {}; + my $errors; + + # + # Check that the meta file mentions all the config + # parameters + # + open(F, $file) || die("can't open $file"); + + while ( ) { + next if ( !/^\s{4}(\w+)\s+=>/ ); + if ( $confVars->{$1} ) { + $done->{$1} = 1; + next; + } + next if ( $1 eq "Hosts" ); + print("$file has $1 but missing from conf/config.pl\n"); + $errors++; + } + close(F); + foreach my $v ( keys(%$confVars) ) { + next if ( $done->{$v} ); + print("$file missing $v from conf/config.pl\n"); + $errors++; + } + return $errors; +} + +sub CheckEditorVsConfig +{ + my($confVars, $file) = @_; + my $done = {}; + my $errors; + + # + # Check that the config editor file mentions all the config + # parameters + # + open(F, $file) || die("can't open $file"); + + while ( ) { + next if ( !/name\s*=>\s*"(\w+)"/ ); + if ( $confVars->{$1} ) { + $done->{$1} = 1; + next; + } + next if ( $1 eq "Hosts" ); + print("$file has $1 but missing from conf/config.pl\n"); + $errors++; + } + close(F); + foreach my $v ( keys(%$confVars) ) { + next if ( $done->{$v} ); + print("$file missing $v from conf/config.pl\n"); + $errors++; + } + return $errors; +} + # # Make sure that every lang variable in cgi-bin/BackupPC_Admin matches # the strings in each lib/BackupPC/Lang/*.pm file. This makes sure