New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #15514: reinplace-warning6.diff

File reinplace-warning6.diff, 1.2 KB (added by ryandesign@…, 10 months ago)

refreshed patch

  • src/port1.0/portutil.tcl

     
    875875 
    876876    set extended 0 
    877877    set suppress 0 
     878    set quiet 0 
    878879    while 1 { 
    879880        set arg [lindex $args 0] 
    880881        if {[string index $arg 0] eq "-"} { 
     
    886887                n { 
    887888                    set suppress 1 
    888889                } 
     890                q { 
     891                    set quiet 1 
     892                } 
    889893                - { 
    890894                    break 
    891895                } 
     
    898902        } 
    899903    } 
    900904    if {[llength $args] < 2} { 
    901         error "reinplace ?-E? pattern file ..." 
     905        error "reinplace ?-E? ?-n? ?-q? pattern file ..." 
    902906    } 
    903907    set pattern [lindex $args 0] 
    904908    set files [lrange $args 1 end] 
     
    939943 
    940944        close $tmpfd 
    941945 
     946        if {![catch {exec cmp -s $file $tmpfile}]} { 
     947            if {!$quiet} { 
     948                ui_warn "[format [msgcat::mc "reinplace %1\$s didn't change anything in %2\$s"] $pattern $file]" 
     949            } 
     950        } 
     951 
    942952        set attributes [file attributes $file] 
    943953        # start gsoc08-privileges 
    944954        chownAsRoot $file