Skipping *nix hidden folders while indexing

Andrea D'Amore and.damore at macports.org
Tue Jan 22 16:30:41 PST 2013


I sometime disable a port in tree and reindex, the natural way to do
it is to prepend a dot to the portdir name. Is there anything against
the following?

Index: src/macports1.0/macports.tcl
===================================================================
--- src/macports1.0/macports.tcl        (revision 101957)
+++ src/macports1.0/macports.tcl        (working copy)
@@ -1689,6 +1689,7 @@
             foreach port [lsort -increasing -unique [readdir
$pathToCategory]] {
                 set pathToPort [file join $pathToCategory $port]
                 if {[file isdirectory $pathToPort] &&
+                    [string index [file tail $pathToPort] 0] != "." &&
                   [file exists [file join $pathToPort "Portfile"]]} {
                     # Call the function.
                     $func [file join $category $port]

--
Andrea


More information about the macports-dev mailing list