Subversion Repositories DevTools

Rev

Rev 7300 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7300 Rev 7322
Line 1... Line -...
1
#! perl
-
 
2
########################################################################
1
########################################################################
3
# COPYRIGHT - VIX IP PTY LTD ("VIX"). ALL RIGHTS RESERVED.
2
# COPYRIGHT - VIX IP PTY LTD ("VIX"). ALL RIGHTS RESERVED.
4
#
3
#
5
# Module name   : jats.sh
4
# Module name   : jats.sh
6
# Module type   : Makefile system
5
# Module type   : Makefile system
Line 377... Line 376...
377
            for my $pat (@patsout)
376
            for my $pat (@patsout)
378
            {
377
            {
379
    #print "------- REJECT $file :: $pat \n" if ( $file =~ /$pat/ );
378
    #print "------- REJECT $file :: $pat \n" if ( $file =~ /$pat/ );
380
                next file if ( $file =~ /$pat/ );
379
                next file if ( $file =~ /$pat/ );
381
            }
380
            }
382
 
-
 
383
            push @result, $rfile;
381
            push @result, $rfile;
384
        }
382
        }
385
    }
383
    }
386
    else
384
    else
387
    {
385
    {
Line 394... Line 392...
394
    #   Reattach the base directory, if required
392
    #   Reattach the base directory, if required
395
    #       full_path  : Prepend full path
393
    #       full_path  : Prepend full path
396
    #       dirs_only  : return list of dirs that have files
394
    #       dirs_only  : return list of dirs that have files
397
    #   Extract dirs only
395
    #   Extract dirs only
398
    #
396
    #
-
 
397
    my %fileList;
399
    foreach  ( @result )
398
    foreach  ( @result )
400
    {
399
    {
401
        my $path;
400
        my $path;
402
        if ( $self->{full_path} )
401
        if ( $self->{full_path} ) {
403
        {
-
 
404
            $path = $self->{base_dir} . '/' . $_;
402
            $path = $self->{base_dir} . '/' . $_;
405
        }
-
 
406
        else
403
        } else {
407
        {
-
 
408
            $path = $_;
404
            $path = $_;
409
        }
405
        }
410
 
406
 
411
        if ( $self->{dirs_only} == 1 )
407
        if ( $self->{dirs_only} == 1 ) {
412
        {
-
 
413
            $path =~ s~/[^/]*$~~;
408
            $path =~ s~/[^/]*$~~;
414
        }
409
        }
415
 
410
 
-
 
411
        #
-
 
412
        #   Add to results - if not already present
-
 
413
        #   Dont use UniquePush - its slow over large lists
-
 
414
        #
-
 
415
        unless (exists $fileList{$path} ) {
416
        UniquePush( $self->{results}, $path);
416
            push( @{$self->{results}}, $path);
-
 
417
            $fileList{$path} = 1;
-
 
418
        }
417
    }
419
    }
418
#DebugDumpData ("Search", $self);
420
#DebugDumpData ("Search", $self);
419
    return @{$self->{results}};
421
    return @{$self->{results}};
420
}
422
}
421
 
423