; COMMAND FILE TO CREATE THE RATFOR DISTRIBUTION KIT
;
.ENABLE SUBSTITUTION
	SET /UIC=[314,1]
.ASKS UIC ENTER SOURCE UIC [XXX,XXX]
.ASK PRINT WANT TO SPOOL TO TT3 NOW
	PIP /NV='UIC'*.RAT,*.CMD,*.MAC,RATFOR.RNO,.ODL,.SUB,.LAY,README.1ST
	PIP *.*/PU
	PIP *.FTN;*/DE/NM,*.LST;*,*.MAP;*,*.OBJ;*,*.OLB;*,*.TMP;*,*.TT3;*
.IFNINS ...RNO	INS $RNO
	RNO RATFOR.DOC/-SP=RATFOR.RNO
; ** NOW WE RUN TECO TO FIX UP THE CARRIAGE CONTROL FOR THE DOC FILE
;    AFTER I RUN TECO, YOU ENTER EX<ESC><ESC>
.IFNINS ...TEC	INS $TECFSL
	TEC RATFOR.DOC
;
; EDIT README.1ST TO UPDATE IT
;
	ED2 README.1ST
;
; EDIT RATRSX TO UNDEFINE f4p AND spawnit AND UPDATE THE 
;	VERSION NUMBER AND DEFINE disk_blocksize AS 512
;
	ED2 RATRSX.RAT
;
; EDIT RATDEF.RAT TO GET SWITCH DEFAULTS RIGHT
;
	ED2 RATDEF.RAT
;
; EDIT TKBRATFOR TO GET THE RESIDENT LIBRARIES RIGHT AND REMOVE BIG BUFFERING
;
	ED2 TKBRATFOR.CMD
;
; EDIT RATFOR.ODL TO GET THE ODL RIGHT
;
	ED2 RATFOR.ODL
;
	PIP README1ST.TT3=README.1ST
	PIP RATFORODL.TT3=RATFOR.ODL
	PIP RATFORDOC.TT3=RATFOR.DOC
	.IFT PRINT	PIP README1ST.TT3,RATFORODL.TT3,RATFORDOC.TT3/SP
	PIP CMD.TT3/ME=*.CMD
	.IFT PRINT	PIP CMD.TT3/SP
;
	.IFNINS ...RAT	INS 'UIC'RATFOR
;
;  BUILD RATFOR FROM SCRATCH
	RAT STRLIB=STRLIB/-LC/-CO/-GO
	FOR STRLIB=STRLIB/-SN
	LBR @LBRSTRLIB
	RAT RAT1=RAT1/-LC/-CO/-GO
	RAT RAT2=RAT2/-LC/-CO/-GO
	RAT RATRSX=RATRSX/-LC/-CO/-GO
	RAT ICSI=ICSI/-LC/-CO/-GO
	FOR @FORRATFOR
	LBR @LBRRATFOR
	TKB @TKBRATFOR
	REM ...RAT
	PIP RATFORMAP.TT3=RATFOR.MAP
	.IFT PRINT	PIP RATFORMAP.TT3/SP
	INS RATFOR
;
; TEST THE NEW RATFOR
	RAT RATRSX.TMP,RATRSX.TT3=RATRSX/SC
	RAT RAT1.TMP,RAT1.TT3=RAT1
	RAT RAT2.TMP,RAT2.TT3=RAT2
	RAT ,ICSI.TT3=ICSI/FO/LC
	.IFT PRINT	PIP RATRSX.TT3,RAT1.TT3,RAT2.TT3,ICSI.TT3/SP
	FOR RATRSX=RATRSX.TMP
	FOR RAT1=RAT1.TMP
	FOR RAT2=RAT2.TMP
	RAT ,STRLIB.TT3=STRLIB/SC
	.IFT PRINT	PIP STRLIB.TT3/SP
	RAT VTLIB/SC
	RAT VTTEST
	PIP VTLIB.TT3=VTLIB.LST
	PIP VTTEST.TT3=VTTEST.LST
	.IFT PRINT	PIP VTLIB.TT3,VTTEST.TT3/SP
	FOR VTLIB=VTLIB
	FOR VTTEST=VTTEST
;
;** IF NO ERRORS ABOVE, ALL IS OK
;
	REM ...RAT
;
	PIP *.TSK;*,*.TMP;*,*.LST;*,*.OBJ;*,*.OLB;*,*.MAP;*/DE
	PIP *.*/PU
	PIP *.*/TR
	PIP *.*;1/RE=*.*;*
	SRD /WB/NA/-LI
	PIP KITDIR.TT3=/LI
	.IFT PRINT	PIP KITDIR.TT3/SP
;
;** DELETE GARBAGE FILES AFTER I EXIT-- DON'T FORGET *.TT3 LATER
;DONE
/
