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
This commit is contained in:
parent
c357ae875b
commit
8962635a7b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3833
@ -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 <bsd.prog.mk>
|
||||
|
@ -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);
|
||||
|
@ -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 <md5.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -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 <bsd.prog.mk>
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user