diff options
author | phk <phk@FreeBSD.org> | 1995-02-19 04:51:41 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1995-02-19 04:51:41 +0000 |
commit | 540b71c23a16c42bbef007d6dbc3ad4280e690dd (patch) | |
tree | 1d8638f38aafa2802e800a0fc7bf2739ab19f657 /usr.sbin | |
parent | feb623896291cfff8748f5c00cc23bc03ec14aa7 (diff) | |
download | FreeBSD-src-540b71c23a16c42bbef007d6dbc3ad4280e690dd.zip FreeBSD-src-540b71c23a16c42bbef007d6dbc3ad4280e690dd.tar.gz |
Some recent small changes. Probably about time I start writing this in C.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ctm/mkCTM/ctm_conf.cvs-cur | 2 | ||||
-rw-r--r-- | usr.sbin/ctm/mkCTM/ctm_conf.src-cur | 4 | ||||
-rw-r--r-- | usr.sbin/ctm/mkCTM/mkCTM | 45 |
3 files changed, 29 insertions, 22 deletions
diff --git a/usr.sbin/ctm/mkCTM/ctm_conf.cvs-cur b/usr.sbin/ctm/mkCTM/ctm_conf.cvs-cur index a740414..b6e54bb 100644 --- a/usr.sbin/ctm/mkCTM/ctm_conf.cvs-cur +++ b/usr.sbin/ctm/mkCTM/ctm_conf.cvs-cur @@ -4,7 +4,7 @@ set CTMname cvs-cur set CTMref /u1/CVS-FreeBSD set CTMdest /u4/ftp/pub/CTM set CTMprefix . -set CTMdont {^/CVSROOT/history.*$|^/src/secure|^/src/eBones|^/sup/} +set CTMdont {.*\.core$|^/CVSROOT/history.*$|^/src/secure|^/src/eBones|^/sup/} set CTMcopy /u1/CTM/$CTMname set CTMtmp /u1/CTM/tmp/_tmp_$CTMname diff --git a/usr.sbin/ctm/mkCTM/ctm_conf.src-cur b/usr.sbin/ctm/mkCTM/ctm_conf.src-cur index 944d69a..8efd6a0 100644 --- a/usr.sbin/ctm/mkCTM/ctm_conf.src-cur +++ b/usr.sbin/ctm/mkCTM/ctm_conf.src-cur @@ -4,8 +4,8 @@ set CTMname src-cur set CTMref /u4/ftp/pub/FreeBSD/SRC-current/src set CTMdest /u4/ftp/pub/CTM set CTMprefix . -set CTMdont {/CVS$|/CVS/Entries$|/CVS/Repository$|^secure|^eBones} -set CTMmail ctm-src-cur +set CTMdont {.*\.core$|/CVS$|/CVS/Entries$|/CVS/Repository$|^secure|^eBones} +set CTMmail ctm-src-cur@freebsd.org set CTMcopy /u1/CTM/$CTMname set CTMtmp /u1/CTM/tmp/_tmp_$CTMname diff --git a/usr.sbin/ctm/mkCTM/mkCTM b/usr.sbin/ctm/mkCTM/mkCTM index 43b5e35..7001046 100644 --- a/usr.sbin/ctm/mkCTM/mkCTM +++ b/usr.sbin/ctm/mkCTM/mkCTM @@ -4,6 +4,7 @@ set CTMignoreCVS 0 set CTMapply 1 set CTMdont {^///} set CTMmail {} +set CTMsuff {} source $argv @@ -17,32 +18,40 @@ set foo $CTMdate set foo $CTMprefix set foo $CTMname -#### -# Find CTM# -for {set i 0} {1} {incr i} { - if {[file exists [format "%s/$CTMname.%04d" $dd $i]]} continue - if {[file exists [format "%s/$CTMname.%04d.gz" $dd $i]]} continue - break -} -set CTMnbr $i +if { "$d1" != "" } { + #### + # Find CTM# + for {set i 0} {1} {incr i} { + if {[file exists [format "%s/$CTMname.%04d" $dd $i]]} continue + if {[file exists [format "%s/$CTMname.%04d.gz" $dd $i]]} continue + break + } + set CTMnbr $i -set fo [open $d2/.ctm_status w] -puts $fo "$CTMname $CTMnbr" -close $fo + set fo [open $d2/.ctm_status w] + puts $fo "$CTMname $CTMnbr" + close $fo -puts "Doing CTMname $CTMname CTMnbr $CTMnbr CTMdate $CTMdate" + puts "Doing CTMname $CTMname CTMnbr $CTMnbr CTMdate $CTMdate" -exec sh -x -c "rm -f ${tmp}.*" >&@ stdout + exec sh -x -c "rm -f ${tmp}.*" >&@ stdout -set f1 [open "| ./ctm_scan $d1"] + set f1 [open "| ./ctm_scan $d1"] + # set this to minus one, to compensate for .ctm_status + set changes -1 +} else { + set CTMnbr [lindex [exec cat $d2/.ctm_status] 1] + puts "Doing CTMname $CTMname CTMnbr $CTMnbr CTMdate $CTMdate" + exec sh -x -c "rm -f ${tmp}.*" >&@ stdout + set f1 [open /dev/null] + set changes 0 +} set f2 [open "| ./ctm_scan $d2"] set fo_del [open $tmp.del w] set fo_rmdir [open $tmp.rmdir w] set fo_mkdir [open $tmp.mkdir w] set fo_files [open $tmp.files w] -# set this to minus one, to compensate for .ctm_status -set changes -1 ##### # Type Name Mode User Group Barf Size Hash @@ -164,10 +173,8 @@ while 1 { } } if {$ll1 < $ll2} { - puts "<$ll1> < <$ll2>\n <$l1>\n <$l2>" eval CTMadd $l2 ; set l2 "" ; continue } else { - puts "<$ll1> > <$ll2>\n <$l1>\n <$l2>" eval CTMdel $l1 ; set l1 "" ; continue } @@ -191,7 +198,7 @@ if {!$changes} { exit 0 } flush stdout -set nm [format "%s.%04d" $CTMname $CTMnbr] +set nm [format "%s.%04d%s" $CTMname $CTMnbr $CTMsuff] exec cat $tmp.begin $tmp.del $tmp.rmdir $tmp.mkdir $tmp.files $tmp.end \ | gzip -9 > ${tmp}:${nm}.gz |