bin/waitfordeb
branchrsync
changeset 43 6d4d4ff0796e
parent 42 73cb1d7a1bd8
child 44 2552664b674a
equal deleted inserted replaced
42:73cb1d7a1bd8 43:6d4d4ff0796e
    34 
    34 
    35 my $incoming = "$ENV{HOME}/incoming";
    35 my $incoming = "$ENV{HOME}/incoming";
    36 my $nfiles   = 0;
    36 my $nfiles   = 0;
    37 my $c        = "$incoming/$ARGV[0]";
    37 my $c        = "$incoming/$ARGV[0]";
    38 
    38 
    39 # first setup a file creation watch on the incoming directory (we cannot set
       
    40 # watches on objects that dont exist yet); then *if* a file which is listed in
       
    41 # the changes file is created inside that directory then setup file
       
    42 # {modification,close} watches on it; we need the modification watch to reset
       
    43 # the 'timeout counter' and verify the file size in the close watch. ofcourse
       
    44 # we need the list of files from the changes file first; we build it here
       
    45 open C, '<', $c or die "Can't open '<$c': $!\n";
    39 open C, '<', $c or die "Can't open '<$c': $!\n";
    46 my $skip = 1;
    40 my $skip = 1;
    47 while (<C>) {
    41 while (<C>) {
    48     no warnings qw(syntax);
    42     no warnings qw(syntax);
    49     if (/^files:\s*$/i) { $skip = 0; next; }
    43     if (/^files:\s*$/i) { $skip = 0; next; }