Changeset 15 for devel/pb/bin/pb.pl


Ignore:
Timestamp:
Jul 30, 2007, 2:47:27 PM (12 years ago)
Author:
bruno
Message:

Begin to deal with filters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb.pl

    r14 r15  
    1919
    2020use lib qw (lib etc);
    21 use vars qw (%defpkgdir %extpkgdir %version);
     21use vars qw (%defpkgdir %extpkgdir %version @filteredfiles);
    2222use common qw (env_init);
    23 use pb qw (defpkgdir extpkgdir version pb_init);
     23use pb qw (defpkgdir extpkgdir version filteredfiles pb_init);
    2424use distro qw (distro_init);
    2525use cms;
     
    167167            }
    168168
     169            # Get all filters to apply
     170            # They're cumulative from less specific to most specific
     171            # suffix is .pbf
     172            if (-d "$ENV{'PBCONF'}/$p/pbfilter") {
     173                opendir(BDIR,"$ENV{'PBCONF'}/$p/pbfilter" || die "Unable to open dir $ENV{'PBCONF'}/$p/pbfilter: $!");
     174                foreach my $f (readdir(BDIR)) {
     175                    if (-f "$ENV{'PBCONF'}/$p/pbfilter/$dtype.pbf") {
     176
     177                @bfiles = grep { ! /^\./ && -f "$ENV{'PBCONF'}/$p/$dtype/$_" } readdir(BDIR);
     178                closedir(BDIR);
     179            }
     180
    169181        }
    170182        close(D);
Note: See TracChangeset for help on using the changeset viewer.