Fixed some typos.
[BackupPC.git] / makeDist
index a0e454f..fc16eef 100755 (executable)
--- 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 ( <F> ) {
+        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 ( <F> ) {
+        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