100 | | ui_info "$UI_PREFIX [format [msgcat::mc "Applying %s"] [file tail $patch]]" |
101 | | switch -- [file extension $patch] { |
102 | | .Z - |
103 | | .gz {command_exec patch "$gzcat \"$patch\" | (" ")"} |
104 | | .bz2 {command_exec patch "$bzcat \"$patch\" | (" ")"} |
105 | | default {command_exec patch "" "< '$patch'"} |
| 100 | set pfile [file tail $patch] |
| 101 | if {![check_statefile patch $pfile $target_state_fd]} { |
| 102 | ui_info "$UI_PREFIX [format [msgcat::mc "Applying %s"] $pfile]" |
| 103 | switch -- [file extension $patch] { |
| 104 | .Z - |
| 105 | .gz {command_exec patch "$gzcat \"$patch\" | (" ")"} |
| 106 | .bz2 {command_exec patch "$bzcat \"$patch\" | (" ")"} |
| 107 | default {command_exec patch "" "< '$patch'"} |
| 108 | } |
| 109 | write_statefile patch $pfile $target_state_fd |
| 110 | } else { |
| 111 | ui_info "$UI_PREFIX [format [msgcat::mc "Skipping already applied %s"] $pfile]" |