summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ctm/mkCTM
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1994-12-08 21:46:04 +0000
committerphk <phk@FreeBSD.org>1994-12-08 21:46:04 +0000
commit270f02056c71fcf8f0c9d55378e49d680351f936 (patch)
tree188ff222119de4a3d9ae4a493961b51b3a27aec6 /usr.sbin/ctm/mkCTM
parentd9ebc16db1c37afa7cc6bdf192cc623a9d332bc8 (diff)
downloadFreeBSD-src-270f02056c71fcf8f0c9d55378e49d680351f936.zip
FreeBSD-src-270f02056c71fcf8f0c9d55378e49d680351f936.tar.gz
Update to current reality.
Diffstat (limited to 'usr.sbin/ctm/mkCTM')
-rw-r--r--usr.sbin/ctm/mkCTM/ctm_conf.cvs-cur2
-rw-r--r--usr.sbin/ctm/mkCTM/ctm_conf.src-cur1
-rw-r--r--usr.sbin/ctm/mkCTM/mkCTM65
3 files changed, 53 insertions, 15 deletions
diff --git a/usr.sbin/ctm/mkCTM/ctm_conf.cvs-cur b/usr.sbin/ctm/mkCTM/ctm_conf.cvs-cur
index 7ab9f23..a740414 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}
+set CTMdont {^/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 b0702fb..944d69a 100644
--- a/usr.sbin/ctm/mkCTM/ctm_conf.src-cur
+++ b/usr.sbin/ctm/mkCTM/ctm_conf.src-cur
@@ -5,6 +5,7 @@ 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 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 850ff14..43b5e35 100644
--- a/usr.sbin/ctm/mkCTM/mkCTM
+++ b/usr.sbin/ctm/mkCTM/mkCTM
@@ -3,6 +3,7 @@
set CTMignoreCVS 0
set CTMapply 1
set CTMdont {^///}
+set CTMmail {}
source $argv
@@ -16,17 +17,6 @@ set foo $CTMdate
set foo $CTMprefix
set foo $CTMname
-exec sh -x -c "rm -f ${tmp}.*" >&@ stdout
-
-set f1 [open "| ./ctm_scan $d1"]
-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 changes 0
-
####
# Find CTM#
for {set i 0} {1} {incr i} {
@@ -36,8 +26,24 @@ for {set i 0} {1} {incr i} {
}
set CTMnbr $i
+set fo [open $d2/.ctm_status w]
+puts $fo "$CTMname $CTMnbr"
+close $fo
+
puts "Doing CTMname $CTMname CTMnbr $CTMnbr CTMdate $CTMdate"
+exec sh -x -c "rm -f ${tmp}.*" >&@ stdout
+
+set f1 [open "| ./ctm_scan $d1"]
+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
@@ -124,6 +130,7 @@ while 1 {
#if {[regexp $CTMdont /$n1]} { set l1 "" ; continue }
if {[regexp $CTMdont /$n2]} { set l2 "" ; continue }
+ # they're all the same...
if {$l1 == $l2} { set l1 "" ; set l2 "" ; continue }
if {$CTMignoreCVS } {
@@ -135,11 +142,37 @@ while 1 {
if {$l2 == "" } { eval CTMdel $l1 ; set l1 "" ; continue }
- if {$n1 < $n2 } { eval CTMdel $l1 ; set l1 "" ; continue }
+ # if the name is the same we're safe...
+ if {$n1 == $n2} { eval CTMchg $l1 $l2 ; set l1 "" ; set l2 "" ; continue }
+
+ # To avoid this anomaly:
+ # A - d src/gnu/lib/libreadline/readline/Attic
+ # A 0 f src/gnu/lib/libreadline/readline/Attic/readline.h,v
+ # A 0 f src/gnu/lib/libreadline/readline.c,v
+ # D 0 f src/gnu/lib/libreadline/readline/readline.h,v
+ # D 0 f src/gnu/lib/libreadline/readline.c,v
+ # we have to make things somewhat complicated...
+
+ # if they have the same number of components...
+ set ll1 [llength [split $n1 /]]
+ set ll2 [llength [split $n2 /]]
+ if {$ll1 == $ll2} {
+ if {$n1 < $n2 } {
+ eval CTMdel $l1 ; set l1 "" ; continue
+ } else {
+ eval CTMadd $l2 ; set l2 "" ; continue
+ }
+ }
+ 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
+ }
+
- if {$n1 > $n2 } { eval CTMadd $l2 ; set l2 "" ; continue }
- if {$n1 == $n2} { eval CTMchg $l1 $l2 ; set l1 "" ; set l2 "" ; continue }
}
close $fo_del
@@ -170,3 +203,7 @@ if {$CTMapply} {
}
exec mv ${tmp}:${nm}.gz $dd/.tmp_${nm}.gz >&@ stdout
exec mv $dd/.tmp_${nm}.gz $dd/${nm}.gz >&@ stdout
+
+if {$CTMmail != ""} {
+ exec /u1/phk/ctm_smail/ctm_smail -m 50000 -c 300000 $dd/${nm}.gz $CTMmail >&@ stdout
+}
OpenPOWER on IntegriCloud