From 7c68a5ca0751398735d82702909fd075d273093f Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 24 Oct 1994 20:09:39 +0000 Subject: These patches fix some lesser problems: 1) malloc.h doesn't exits in 2.0. 2) Makefile.inc wasn't picked up so one of the build steps (install?) failed. 3) LIBMD wasn't depended on. 4) "ctm foo" dumped core because "foo" doesn't have a '.' in it. Bruce I updated the mkCTM stuff while I was at it anyway. /phk Reviewed by: phk Submitted by: bde --- usr.sbin/ctm/ctm/Makefile | 5 ++++- usr.sbin/ctm/ctm/ctm.c | 4 ++-- usr.sbin/ctm/ctm/ctm.h | 3 +-- usr.sbin/ctm/ctm_scan/Makefile | 5 ++++- usr.sbin/ctm/mkCTM/ctm_conf.cvs-cur | 8 +++++--- usr.sbin/ctm/mkCTM/ctm_conf.src-cur | 8 +++++--- usr.sbin/ctm/mkCTM/mkCTM | 14 +++++++++++--- 7 files changed, 32 insertions(+), 15 deletions(-) (limited to 'usr.sbin/ctm') diff --git a/usr.sbin/ctm/ctm/Makefile b/usr.sbin/ctm/ctm/Makefile index 6906366..7c01d35 100644 --- a/usr.sbin/ctm/ctm/Makefile +++ b/usr.sbin/ctm/ctm/Makefile @@ -6,7 +6,7 @@ # this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp # ---------------------------------------------------------------------------- # -# $Id$ +# $Id: Makefile,v 1.5 1994/09/22 02:49:15 phk Exp $ # PROG= ctm @@ -14,6 +14,9 @@ NOTYET= ctm_ed.c SRCS= ctm.c ctm_input.c ctm_pass1.c ctm_pass2.c ctm_pass3.c \ ctm_syntax.c ctm_ed.c LDADD+= -lmd +DPADD+= ${LIBMD} NOMAN= 1 CFLAGS+= -Wall -g + +.include "../../Makefile.inc" .include diff --git a/usr.sbin/ctm/ctm/ctm.c b/usr.sbin/ctm/ctm/ctm.c index d4af9a6..90538ce 100644 --- a/usr.sbin/ctm/ctm/ctm.c +++ b/usr.sbin/ctm/ctm/ctm.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id$ + * $Id: ctm.c,v 1.4 1994/09/22 02:49:15 phk Exp $ * * This is the client program of 'CTM'. It will apply a CTM-patch to a * collection of files. @@ -106,7 +106,7 @@ Proc(char *filename) if(!strcmp(filename,"-")) { p = 0; f = stdin; - } else if(!strcmp(p,".gz") || !strcmp(p,".Z")) { + } else if(p && (!strcmp(p,".gz") || !strcmp(p,".Z"))) { p = Malloc(100); strcpy(p,"gunzip < "); strcat(p,filename); diff --git a/usr.sbin/ctm/ctm/ctm.h b/usr.sbin/ctm/ctm/ctm.h index 93d1f9f..0812f0f 100644 --- a/usr.sbin/ctm/ctm/ctm.h +++ b/usr.sbin/ctm/ctm/ctm.h @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id$ + * $Id: ctm.h,v 1.4 1994/09/22 02:49:16 phk Exp $ * */ @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/usr.sbin/ctm/ctm_scan/Makefile b/usr.sbin/ctm/ctm_scan/Makefile index 6230e6d..f009338 100644 --- a/usr.sbin/ctm/ctm_scan/Makefile +++ b/usr.sbin/ctm/ctm_scan/Makefile @@ -6,10 +6,13 @@ # this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp # ---------------------------------------------------------------------------- # -# $Id$ +# $Id: Makefile,v 1.5 1994/09/22 02:49:22 phk Exp $ # PROG= ctm_scan LDADD+= -lmd +DPADD+= ${LIBMD} NOMAN= 1 CFLAGS+= -Wall + +.include "../../Makefile.inc" .include diff --git a/usr.sbin/ctm/mkCTM/ctm_conf.cvs-cur b/usr.sbin/ctm/mkCTM/ctm_conf.cvs-cur index bbef14d..7ab9f23 100644 --- a/usr.sbin/ctm/mkCTM/ctm_conf.cvs-cur +++ b/usr.sbin/ctm/mkCTM/ctm_conf.cvs-cur @@ -1,9 +1,11 @@ #!/usr/local/bin/tclsh set CTMname cvs-cur -set CTMdest /u4/CTM set CTMref /u1/CVS-FreeBSD +set CTMdest /u4/ftp/pub/CTM set CTMprefix . -set CTMcopy $CTMdest/$CTMname -set CTMtmp $CTMdest/_tmp_$CTMname +set CTMdont {^/CVSROOT/history.*$|^/src/secure|^src/eBones} + +set CTMcopy /u1/CTM/$CTMname +set CTMtmp /u1/CTM/tmp/_tmp_$CTMname set CTMdate [exec date -u +%Y%m%d%H%M%SZ] diff --git a/usr.sbin/ctm/mkCTM/ctm_conf.src-cur b/usr.sbin/ctm/mkCTM/ctm_conf.src-cur index d81d39f..b0702fb 100644 --- a/usr.sbin/ctm/mkCTM/ctm_conf.src-cur +++ b/usr.sbin/ctm/mkCTM/ctm_conf.src-cur @@ -1,9 +1,11 @@ #!/usr/local/bin/tclsh set CTMname src-cur -set CTMdest /u1/CTM set CTMref /u4/ftp/pub/FreeBSD/SRC-current/src +set CTMdest /u4/ftp/pub/CTM set CTMprefix . -set CTMcopy $CTMdest/$CTMname -set CTMtmp $CTMdest/_tmp_$CTMname +set CTMdont {/CVS$|/CVS/Entries$|/CVS/Repository$|^secure|^eBones} + +set CTMcopy /u1/CTM/$CTMname +set CTMtmp /u1/CTM/tmp/_tmp_$CTMname set CTMdate [exec date -u +%Y%m%d%H%M%SZ] diff --git a/usr.sbin/ctm/mkCTM/mkCTM b/usr.sbin/ctm/mkCTM/mkCTM index 35198e9..850ff14 100644 --- a/usr.sbin/ctm/mkCTM/mkCTM +++ b/usr.sbin/ctm/mkCTM/mkCTM @@ -2,9 +2,12 @@ set CTMignoreCVS 0 set CTMapply 1 +set CTMdont {^///} source $argv +cd /u1/CTM/SW + set tmp $CTMtmp set dd $CTMdest set d1 $CTMcopy @@ -118,6 +121,9 @@ while 1 { set n1 [lindex $l1 1] set n2 [lindex $l2 1] + #if {[regexp $CTMdont /$n1]} { set l1 "" ; continue } + if {[regexp $CTMdont /$n2]} { set l2 "" ; continue } + if {$l1 == $l2} { set l1 "" ; set l2 "" ; continue } if {$CTMignoreCVS } { @@ -152,13 +158,15 @@ if {!$changes} { exit 0 } flush stdout -set nm [format "%s/%s.%04d" $dd $CTMname $CTMnbr] +set nm [format "%s.%04d" $CTMname $CTMnbr] exec cat $tmp.begin $tmp.del $tmp.rmdir $tmp.mkdir $tmp.files $tmp.end \ - | gzip -9 > ${nm}.gz + | gzip -9 > ${tmp}:${nm}.gz exec sh -x -c "rm -f ${tmp}.*" >&@ stdout if {$CTMapply} { - exec sh -e -x -c "cd $CTMcopy ; /root/CTM/ctm -v -v -v ${nm}.gz" >&@ stdout + exec sh -e -x -c "cd $CTMcopy ; /u1/CTM/SW/ctm -v -v -v ${tmp}:${nm}.gz" >&@ stdout } +exec mv ${tmp}:${nm}.gz $dd/.tmp_${nm}.gz >&@ stdout +exec mv $dd/.tmp_${nm}.gz $dd/${nm}.gz >&@ stdout -- cgit v1.1