Ticket #292: portall.tcl.diff

File portall.tcl.diff, 1.2 KB (added by jpm@…, 21 years ago)

diff adds directory heuristics

  • base/src/port/portall.tcl

    RCS file: /Volumes/src/cvs/od/proj/darwinports/base/src/port/portall.tcl,v
    retrieving revision 1.15
    diff -u -r1.15 portall.tcl
     
    1111proc port_traverse {func {dir .}} {
    1212    set pwd [pwd]
    1313    if [catch {cd $dir} err] {
    14         ui_error $err
    15         return
     14                ui_error $err
     15                return
    1616    }
    1717    foreach name [readdir .] {
    18         if {[string match $name .] || [string match $name ..]} {
    19             continue
    20         }
    21         if [file isdirectory $name] {
    22             port_traverse $func $name
    23         } else {
    24             if [string match $name Portfile] {
    25                 catch {eval $func {[file join $pwd $dir]}}
    26             }
    27         }
     18                if {[string match $name "."] ||
     19                        [string match $name ".."] ||
     20                        [string match $name "CVS"] ||
     21                        [string match $name "files"] ||
     22                        [string match $name "work"]} {
     23                        continue
     24                }
     25                if {[file isdirectory $name]} {
     26                        port_traverse $func $name
     27                } else {
     28                        if [string match $name Portfile] {
     29                                catch {eval $func {[file join $pwd $dir]}}
     30                }
     31                }
    2832    }
    2933    cd $pwd
    3034}