[BACK]Return to CurrentTorrents.pl CVS log [TXT][DIR] Up to [local] / openbsd / OpenBSDTorrents

Diff for /openbsd/OpenBSDTorrents/CurrentTorrents.pl between version 1.10 and 1.12

version 1.10, 2005/04/06 23:40:20 version 1.12, 2005/05/02 21:27:00
Line 16 
Line 16 
   
 justme();  justme();
   
   my $Name_Filter = shift || '';
   if ($Name_Filter =~ /^(\w*)$/) {
           $Name_Filter = $1;
   } else {
           die "Invalid filter: $Name_Filter";
   }
   
 my %files;  my %files;
 opendir DIR, $OBT->{DIR_TORRENT}  opendir DIR, $OBT->{DIR_TORRENT}
         or die "Couldn't opendir $OBT->{DIR_TORRENT}: $!";          or die "Couldn't opendir $OBT->{DIR_TORRENT}: $!";
Line 50 
Line 57 
 my %keep;  my %keep;
 my @delete;  my @delete;
 foreach my $name (keys %files) {  foreach my $name (keys %files) {
         #print "$name\n";          next unless $name =~ /^$Name_Filter/;
           print "Checking $name\n";
   
         foreach my $epoch ( sort { $b <=> $a } keys %{ $files{$name} } ) {          foreach my $epoch ( sort { $b <=> $a } keys %{ $files{$name} } ) {
                 #print "\t$epoch\n";                  #print "\t$epoch\n";
Line 103 
Line 111 
   
 foreach (@delete) {  foreach (@delete) {
         print "Deleting '$_'\n";          print "Deleting '$_'\n";
         unlink $OBT->{TORRENTDIR} . "/$_" or die "Couldn't unlink $_";          unlink $OBT->{DIR_TORRENT} . "/$_" or die "Couldn't unlink $_";
 }  }

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.12

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>