RCS file: /Volumes/src/cvs/od/proj/darwinports/base/src/port/portindex.tcl,v
retrieving revision 1.12
diff -u -r1.12 portindex.tcl
|
|
|
19 | 19 | proc port_traverse {func {dir .} {cwd ""}} { |
20 | 20 | set pwd [pwd] |
21 | 21 | if [catch {cd $dir} err] { |
22 | | puts $err |
23 | | return |
| 22 | puts $err |
| 23 | return |
24 | 24 | } |
25 | 25 | foreach name [readdir .] { |
26 | | if {[string match $name .] || [string match $name ..]} { |
27 | | continue |
28 | | } |
29 | | if [file isdirectory $name] { |
30 | | port_traverse $func $name [file join $cwd $name] |
31 | | } else { |
32 | | if [string match $name Portfile] { |
33 | | $func $cwd |
34 | | } |
35 | | } |
| 26 | if {[string match $name "."] || |
| 27 | [string match $name ".."] || |
| 28 | [string match $name "CVS"] || |
| 29 | [string match $name "files"] || |
| 30 | [string match $name "work"]} { |
| 31 | continue |
| 32 | } |
| 33 | if {[file isdirectory $name]} { |
| 34 | port_traverse $func $name [file join $cwd $name] |
| 35 | } else { |
| 36 | if [string match $name Portfile] { |
| 37 | $func $cwd |
| 38 | } |
| 39 | } |
36 | 40 | } |
37 | 41 | cd $pwd |
38 | 42 | } |