* BackupPC_Admin now uses $Conf{UmaskMode}, so config.pl files
[BackupPC.git] / makeDist
index 472fb5f..ec18f44 100755 (executable)
--- a/makeDist
+++ b/makeDist
@@ -53,8 +53,8 @@ die("BackupPC::Lib->new failed\n")
 
 umask(0022);
 
-my $Version     = "3.0.0beta2";
-my $ReleaseDate = "31 Oct 2006";
+my $Version     = "3.0.0";
+my $ReleaseDate = "21 Jan 2007";
 my $DistDir     = "dist/BackupPC-$Version";
 
 my @PerlSrc = qw(
@@ -216,7 +216,8 @@ pod2html("doc/BackupPC.pod",
         "--outfile=doc/BackupPC.html");
 
 foreach my $file ( (@PerlSrc,
-           <images/*>,
+           <images/*.gif>,
+           <images/*.png>,
            qw(
                conf/config.pl
                conf/hosts
@@ -256,7 +257,7 @@ sub InstallFile
     my($file, $dest) = @_;
 
     unlink($dest) if ( -d $dest );
-    if ( $file =~ /\.gif/ ) {
+    if ( $file =~ /\.gif/ || $file =~ /\.png/ ) {
         die("can't copy($file, $dest)\n") unless copy($file, $dest);
     } else {
        open(FILE, $file)   || die("can't open $file for reading\n");
@@ -269,24 +270,15 @@ sub InstallFile
            s/__RELEASEDATE__/$ReleaseDate/g;
            if ( $file =~ /BackupPC\.html$/ ) {
                #
-               # fixup for perl 5.6.x
+               # fixup for conf links
                #
-               if ( !/A NAME="item_(%|_)24Conf/i ) {
+               if ( !/A NAME="item_(%|_)conf/i ) {
                    s/\$Conf{([^}]*)}/
                        defined($ConfName{$1})
-                           ? "\L<A HREF=\"#$ConfName{$1}\">\E\$Conf{$1}<\/A>"
+                           ? "\L<a href=\"#$ConfName{$1}\">\E\$Conf{$1}<\/A>"
                            : "\$Conf{$1}"/eg;
                }
-               s/<(A NAME="item_(%|_)24Conf(%|_)7B(.*?)(%|_)7D).*?">/\L<A NAME="item_%24Conf%7b$4%7d">/ig;
                s/^<DD>/<DD><P>/;
-               #
-               # Fixup for perl 5.8.x first one no longer needed after
-               # fix in CSS)
-               #
-#              if ( /^<\/dt>/ ) {
-#                  $_ .= <FILE>;
-#                  s/^(<\/dt>\n<dd>)/$1<p>/s;
-#              }
                s/^<li><\/li>/<li>/;
            }
            if ( /__CONFIGPOD__/ ) {
@@ -355,10 +347,8 @@ sub config2pod
                 s/([^;])\s*$/$1 .../;
             }
             push(@conf, $_);
-            my $text = "\$Conf{$var}";
-            $text =~ s/\s+/_/sg;
-            $text =~ s{(\W)}{sprintf("%%%02X", ord($1) )}gxe;
-            $text = substr($text, 0, 50);
+            my $text = "_conf_${var}_";
+            $text =~ s{[\W\s]}{_}g;
             $ConfName{$var} = "item_$text";
         } elsif ( /^$/ ) {
             if ( $str ne "" && @conf ) {