* The CSS definition has been removed from the config.pl file and
[BackupPC.git] / makeDist
index 0a54477..3e8ff3a 100755 (executable)
--- a/makeDist
+++ b/makeDist
@@ -42,8 +42,8 @@ use Getopt::Std;
 
 umask(0022);
 
-my $Version     = "2.1.0_CVS";
-my $ReleaseDate = "13 Mar 2004";
+my $Version     = "2.1.0beta0_CVS";
+my $ReleaseDate = "29 Mar 2004";
 my $DistDir     = "dist/BackupPC-$Version";
 
 my @PerlSrc = qw(
@@ -116,6 +116,8 @@ my $errCnt;
 
 $errCnt += CheckConfigParams("conf/config.pl", $ConfVars, 0);
 
+$errCnt += CheckConfigParams("doc-src/BackupPC.pod", $ConfVars, 1);
+
 #
 # These config parameters are not used in the code, so ignore them.
 #
@@ -186,6 +188,7 @@ foreach my $file ( (@PerlSrc,
            qw(
                conf/config.pl
                conf/hosts
+               conf/BackupPC_stnd.css
                init.d/README
                init.d/src/debian-backuppc
                init.d/src/gentoo-backuppc
@@ -225,14 +228,29 @@ sub InstallFile
        binmode(FILE);
        binmode(OUT);
        while ( <FILE> ) {
-           s/^# *Version \d+\.\d+[\.\w]*, released \d+ \w+ \d{4}\.?/# Version __VERSION__, released __RELEASEDATE__./;
+           s/^([#*\s]+)Version \d+\.\d+[\.\w]*, released \d+ \w+ \d{4}\.?/$1Version __VERSION__, released __RELEASEDATE__./;
            s/__VERSION__/$Version/g;
            s/__RELEASEDATE__/$ReleaseDate/g;
-           if ( $file =~ /BackupPC\.html$/ && !/A NAME="item_%24Conf/ ) {
-               s/\$Conf{([^}]*)}/
+           if ( $file =~ /BackupPC\.html$/ ) {
+               #
+               # fixup for perl 5.6.x
+               #
+               if ( !/A NAME="item_%24Conf/i ) {
+                   s/\$Conf{([^}]*)}/
                        defined($ConfName{$1})
-                           ? "<A HREF=\"#$ConfName{$1}\">\$Conf{$1}<\/A>"
+                           ? "\L<A HREF=\"#$ConfName{$1}\">\E\$Conf{$1}<\/A>"
                            : "\$Conf{$1}"/eg;
+               }
+               s/<(A NAME="item_%24Conf%7B.*?%7D).*?">/\L<$1">/ig;
+               s/^<DD>/<DD><P>/;
+               #
+               # fixup for perl 5.8.x
+               #
+               if ( /^<\/dt>/ ) {
+                   $_ .= <FILE>;
+                   s/^(<\/dt>\n<dd>)/$1<p>/s;
+               }
+               s/^<li><\/li>/<li>/;
            }
            if ( /__CONFIGPOD__/ ) {
                print OUT $ConfPod;
@@ -296,7 +314,7 @@ sub config2pod
                 s/([^;])\s*$/$1 .../;
             }
             push(@conf, $_);
-            my $text = $_;
+            my $text = "\$Conf{$var}";
             $text =~ s/\s+/_/sg;
             $text =~ s{(\W)}{sprintf("%%%02X", ord($1) )}gxe;
             $text = substr($text, 0, 50);