head	1.5;
access;
symbols;
locks
	dlorre:1.5; strict;
comment	@# @;


1.5
date	97.10.07.09.16.24;	author dlorre;	state Exp;
branches;
next	1.4;

1.4
date	97.10.06.20.08.42;	author dlorre;	state Exp;
branches;
next	1.3;

1.3
date	97.10.06.20.04.12;	author dlorre;	state Exp;
branches;
next	1.2;

1.2
date	97.10.06.19.48.33;	author dlorre;	state Exp;
branches;
next	1.1;

1.1
date	97.10.06.19.45.41;	author dlorre;	state Exp;
branches;
next	;


desc
@handles ci automatically
@


1.5
log
@collision between scripts .BRA .KET definitions corrected
@
text
@.Key AppName/A
.Bra {
.Ket }

; $Id: ciall 1.4 1997/10/06 20:08:42 dlorre Exp dlorre $
; CiAll : Does CI automatically for an application
; To make it work, you will have first to initialize with :

; Day2Var lastciAppName

; where AppName is the name of your application
; The Day2Var program makes two environnement variables storing the current
; date and the current time and use the given prefix for their name
Day2Var Now

; this two scripts are created automatically but could also be stored
; permanently in S:, they are required because lformat arguments
; and variable contents are expanded in the first call.

Echo CiAll for {AppName}

; GetDate store the date of the given file into the variable ftime
Echo > RAM:getdate ".Key Name*N.Bra [*N.Ket ]*NList > env:ftime [Name] LFORMAT *"%D %T*""

; RecDate change the given file date with the contents of the variable ftime
Echo > RAM:recdate ".Key Name*N.Bra ]*N.Ket ]*NSetDate [Name] $ftime"

Protect RAM:getdate +s
Protect RAM:recdate +s

; Due to C:List limitation we cannot check both date and time so we check
; which variable to use

IF $Nowdate EQ $lastci{AppName}date
SetEnv CheckIt $lastci{AppName}time
Else
SetEnv CheckIt $lastci{AppName}date
Endif

; This complicate list command does :
; - seeks for .c or .h files
; - look only the files modified since $CheckIt
; - creates a script file named ram:aze

; The script file does :
;  - rcsdiff on the file
;  - display the results with RUN:more (for having a separate window,
;    else use only more)
;  - get the file date
;  - operates ci -l on the file (then the file date has changed)
;  - restore the file date

list > ram:aze PAT=#?.(c|h) SINCE $CheckIt LFORMAT "rcsdiff %P%N > ram:bre*NRUN more ram:bre*Ngetdate %P%N*N ci -l %P%N*Nrecdate %P%N"
execute ram:aze

; supposing you have multiple directories, you have to cd
; and replicate the command
;cd include
;list > ram:aze PAT=#?.(h) SINCE $CheckIt LFORMAT "rcsdiff %P%N > ram:bre*NRUN more ram:bre*Ngetdate %P%N*N ci -l %P%N*Nrecdate %P%N"
;execute ram:aze
;cd /

; Now our project has a new ci date
Day2Var lastci{AppName}

; Some cleanup
Delete RAM:getdate RAM:recdate  QUIET
Delete ENV:ftime RAM:aze RAM:bre QUIET
; Et voilą !
@


1.4
log
@MyApp renamed as AppName
seems to work fine
@
text
@d5 1
a5 1
; $Id$
d23 1
a23 1
Echo > RAM:getdate ".Key Name*N.Bra {*N.Ket }*NList > env:ftime {Name} LFORMAT *"%D %T*""
d26 1
a26 1
Echo > RAM:recdate ".Key Name*N.Bra {*N.Ket }*NSetDate {Name} $ftime"
@


1.3
log
@changed for having MyApp as a parameter
@
text
@d1 1
a1 1
.Key {MyApp}/A
d9 1
a9 1
; Day2Var lastciMyApp
d11 1
a11 1
; where MyApp is the name of your application
d20 2
d34 2
a35 2
IF $Nowdate EQ $lastci{MyApp}date
SetEnv CheckIt $lastci{MyApp}time
d37 1
a37 1
SetEnv CheckIt $lastci{MyApp}date
d64 1
a64 1
Day2Var lastci{MyApp}
@


1.2
log
@added some comments
@
text
@d1 4
d7 3
a9 1
; The application name is here MyApp to avoid confusion with Ciall or Day2Var
d11 1
d17 2
a18 1
; permanently in S:
d32 2
a33 2
IF $Nowdate EQ $lastciMyAppdate
SetEnv CheckIt $lastciMyApptime
d35 1
a35 1
SetEnv CheckIt $lastciMyAppdate
d38 13
d59 1
a59 3
cd /
Day2Var lastciMyApp

d61 2
d64 4
@


1.1
log
@Initial revision
@
text
@d3 1
d32 6
a37 3
cd class
list > ram:aze PAT=#?.(c|h) SINCE $CheckIt LFORMAT "rcsdiff %P%N > ram:bre*NRUN more ram:bre*Ngetdate %P%N*N ci -l %P%N*Nrecdate %P%N"
execute ram:aze
@
