[73227] trunk/base/src/port1.0/portutil.tcl

ryandesign at macports.org ryandesign at macports.org
Sat Nov 6 22:06:15 PDT 2010


Revision: 73227
          http://trac.macports.org/changeset/73227
Author:   ryandesign at macports.org
Date:     2010-11-06 22:06:12 -0700 (Sat, 06 Nov 2010)
Log Message:
-----------
portutil.tcl: add -n (suppress) option to reinplace; see #26406

Modified Paths:
--------------
    trunk/base/src/port1.0/portutil.tcl

Modified: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl	2010-11-07 05:03:30 UTC (rev 73226)
+++ trunk/base/src/port1.0/portutil.tcl	2010-11-07 05:06:12 UTC (rev 73227)
@@ -858,6 +858,7 @@
 proc reinplace {args}  {
 
     set extended 0
+    set suppress 0
     while 1 {
         set arg [lindex $args 0]
         if {[string index $arg 0] eq "-"} {
@@ -866,6 +867,9 @@
                 E {
                     set extended 1
                 }
+                n {
+                    set suppress 1
+                }
                 - {
                     break
                 }
@@ -904,6 +908,9 @@
             }
             lappend cmdline $portutil::autoconf::sed_ext_flag
         }
+        if {$suppress} {
+            lappend cmdline -n
+        }
         set cmdline [concat $cmdline [list $pattern < $file >@ $tmpfd]]
         if {[catch {eval exec $cmdline} error]} {
             global errorInfo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101106/c2fd85db/attachment.html>


More information about the macports-changes mailing list