Ignore:
Timestamp:
Sep 15, 2002, 9:03:36 AM (18 years ago)
Author:
landonf (Landon Fuller)
Message:

Use the command magic to set up the patch command

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portpatch.tcl

    r608 r649  
    3939set UI_PREFIX "---> "
    4040
     41# Add command patch
     42commands patch
     43# Set up defaults
     44default patch.dir {${workpath}/${worksrcdir}}
     45default patch.cmd patch
     46default patch.pre_args -p0
     47
    4148proc patch_main {args} {
    4249    global portname patchfiles distpath filedir workdir worksrcdir portpath UI_PREFIX
     
    6067        switch -glob -- [file tail $patch] {
    6168            *.Z -
    62             *.gz {system "gzcat \"$patch\" | patch -p0"}
    63             *.bz2 {system "bzcat \"$patch\" | patch -p0"}
    64             default {system "patch -p0 < \"$patch\""}
     69            *.gz {system "gzcat \"$patch\" | [command patch]}
     70            *.bz2 {system "bzcat \"$patch\" | [command patch]"}
     71            default {system "[command patch] < \"$patch\""}
    6572        }
    6673    }
Note: See TracChangeset for help on using the changeset viewer.