gfsd-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gfsd]please apply


From: Matt Kraai
Subject: [gfsd]please apply
Date: Mon, 4 Jun 2001 09:55:04 -0600
User-agent: Mutt/1.2.5i

Howdy,

Could someone please apply the following patch?  It should fix the
case-sensitivity problems on the listing.html page.

Matt

Index: makelist.pl
===================================================================
RCS file: /cvsroot/gnulist/gnulist/makelist.pl,v
retrieving revision 1.9
diff -u -r1.9 makelist.pl
--- makelist.pl 2001/05/17 01:27:02     1.9
+++ makelist.pl 2001/06/04 15:49:55
@@ -22,6 +22,27 @@
 $entry_dir = "cordelia";
 $bug_address = 'address@hidden';
 
+foreach $file (glob "$entry_dir/*.txt")
+  {
+    open (TXTFILE, "<$file") or die "Cannot open $file: $!";
+    @txtfile = <TXTFILE>;
+    close(TXTFILE);
+
+    $file =~ s[$entry_dir/(.*)\.txt][$1];
+    foreach $line (@txtfile)
+      {
+       if($line=~/^%%short-description:\s*(.*)/)
+         {
+           $packages{$file} = $1;
+         }
+
+       if ($line =~ /^%%version:\s*(\S+) released on (\d\d\d\d-\d\d-\d\d)/)
+         {
+           $releases{$2} .= "<dd><a href=\"$file.html\">$file</a> $1</dd>\n";
+         }
+      }
+  }
+
 open OUT, "> $html_dir/listing.html"
     or die "makelist.pl: could not open $html_dir/listing.html for output.";
 
@@ -63,32 +84,23 @@
 <dl>
 BODY
 $currentletter = NULL;
-foreach $file (glob "$entry_dir/*.txt")
-{
-    open(TXTFILE, "<$file") or die "Cannot open txt file: $!";
-    $file =~ s[$entry_dir/(.*)\.txt][$1];
-    if(lc(substr($file,0,1)) ne $currentletter)
-    {
-       $currentletter = lc(substr($file,0,1));
-       print OUT "\n<dt><a name=\"$currentletter\" 
href=\"$1.html\">$1</a></dt>\n";
-    } else {
-       print OUT "\n<dt><a href=\"$1.html\">$1</a></dt>\n";
-    }
-
-    @txtfile = <TXTFILE>;
-    close(TXTFILE);
-    foreach $line (@txtfile)
-    {
-        if($line=~/^%%short-description:\s*(.*)/)
-        {
-             print OUT "<dd>$1</dd>";
-        }
+foreach $package (sort {uc($a) cmp uc($b)} keys %packages)
+  {
+    if(lc(substr($package,0,1)) ne $currentletter)
+      {
+       $currentletter = lc(substr($package,0,1));
+       print OUT "\n<dt><a name=\"$currentletter\" 
href=\"$package.html\">$package</a></dt>\n";
+      }
+    else
+      {
+       print OUT "\n<dt><a href=\"$package.html\">$package</a></dt>\n";
+      }
 
-        if ($line =~ /^%%version:\s*(\S+) released on (\d\d\d\d-\d\d-\d\d)/) {
-             $releases{$2} .= "<dd><a href=\"$file.html\">$file</a> $1</dd>\n";
-        }
-    }
-}
+    if ($packages{$package})
+      {
+        print OUT "<dd>$packages{$package}</dd>\n";
+      }
+  }
 
 print OUT <<EOF;
 </dl>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]