[45434] users/perry/port_cutleaves/port_cutleaves
perry at macports.org
perry at macports.org
Thu Jan 15 18:52:41 PST 2009
Revision: 45434
http://trac.macports.org/changeset/45434
Author: perry at macports.org
Date: 2009-01-15 18:52:41 -0800 (Thu, 15 Jan 2009)
Log Message:
-----------
perry/port_cutleaves - Comments and empty lines are ignored.
Modified Paths:
--------------
users/perry/port_cutleaves/port_cutleaves
Modified: users/perry/port_cutleaves/port_cutleaves
===================================================================
--- users/perry/port_cutleaves/port_cutleaves 2009-01-16 00:52:11 UTC (rev 45433)
+++ users/perry/port_cutleaves/port_cutleaves 2009-01-16 02:52:41 UTC (rev 45434)
@@ -16,7 +16,7 @@
set to_process {}
foreach leaf $leaves {
set full_name [full_name $leaf]
- if {[lsearch -glob $processed_leaves $full_name] != -1} {
+ if {[lsearch -exact $processed_leaves $full_name] != -1} {
continue
}
lappend processed_leaves $full_name
@@ -97,13 +97,23 @@
}
proc exclusions {file} {
+ # Open the specified exclusions file.
if {![file exists $file]} {
return {}
} elseif {[catch {set exclusions_file [open $file]} result]} {
puts stderr "Warning: open failed: $result"
return {}
}
- set exclusions [split [read -nonewline $exclusions_file] \n]
+
+ set exclusions {}
+ foreach line [split [read -nonewline $exclusions_file] \n] {
+ # Ignore comments and empty lines.
+ switch -regexp $line {
+ {^\s*#} -
+ {^$} {}
+ default { lappend exclusions $line }
+ }
+ }
close $exclusions_file
return $exclusions
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090115/b1b0ba7c/attachment.html>
More information about the macports-changes
mailing list