;
;	[ 1 , 1 ] T A R G E T G E N . C M D
;
.ENABLE SUBSTITUTION
.10:
.ASKS DEV DEVICE TO COPY SYSGEN FILES TO
.SETS DB0 "DB0"
.IF DB0 EQ DEV .GOTO WRONGD
.ASKS VOLID VOLUME ID OF 'DEV':
DMO 'DEV':
MOU 'DEV':'VOLID'/ACP=DB1ACP/EXT=11
;
;	RE-INSTALL BIG PIP AND SYSGEN PHASE 1 ROUTINES
;	22 BLOCK INCREMENT
;
REM ...PIP
INS [11,1]PIP/INC=5632
INS [11,1]SGN1/TASK=...SG1
INS [11,1]INV
;
;	WRITE PROTECT ALL DEVICES BUT TARGET DEVICE
;
.ASK GO ARE DRIVES OTHER THAN TARGET DEVICE HARDWARE WRITE-PROTECTED
.IFF GO .GOTO END
;
;
;	CREATE UFDS
;
.ASK CUFDS CREATE UFDS
.IFF CUFDS .GOTO 20
UFD 'DEV':[1,1]
UFD 'DEV':[1,2]
UFD 'DEV':[1,3]
UFD 'DEV':[1,4]
UFD 'DEV':[1,6]
UFD 'DEV':[11,1]
UFD 'DEV':[11,17]
UFD 'DEV':[1,100]
.20:
;
;	EVERYTHING ON 'DEV':([11,1], [11,17]) WILL BE DELETED AND
;	NEWEST VERSIONS FROM MASTER SYSTEM PACK COPIED OVER
;
.ASK PRO PROCEED FOR DELETE AND COPY
.IFF PRO .GOTO END
PIP 'DEV':[11,1]*.*;*/DE
PIP 'DEV':[11,17]*.*;*/DE
;
PIP 'DEV':[11,1]=DB0:[11,1]*.*
PIP 'DEV':[11,1]RMSBCK.TSK;*,RMSCNV.TSK;*,RMSDFN.TSK;*/DE
PIP 'DEV':[11,1]RMSDSP.TSK;*,RMSRST.TSK;*/DE
;
PIP 'DEV':[11,17]=DB0:[11,17]EXEC.TSK,EXECUTIVE.STB,RP04BOOT.*,SGN2.TSK
PIP 'DEV':[11,17]=DB0:[11,17]SYSBLD.CMD,SYSGEN.CMD,SYSGENREM.CMD
;
;	SELECTED FILES ON 'DEV':[1,1] ARE TO BE DELETED AND NEWEST
;       VERSIONS COPIED OVER FROM MASTER PACK
;
PIP 'DEV':[1,1]EXEC.STB;*, FCPCOM.*;*/DE
PIP 'DEV':[1,1]HNDLIB.*;*, IASSYM.STB;*/DE
PIP 'DEV':[1,1]RSXMAC.SML;*, SYSLIB.OLB;*, SYSRES.*;*/DE
PIP 'DEV':[1,1]IASCOM.*;*/DE
PIP 'DEV':[1,1]TRACE.*;*, ODT.*;*/DE
PIP 'DEV':[1,1]F4PRES.*;*, F4PFIX.*;*, NOT.TSK;*/DE
;
;	NOW COPY THE FILES
;
PIP 'DEV':[1,1]=DB0:[1,1]EXEC.STB, FCPCOM.*, F4PRES.*, F4PFIX.TSK
PIP 'DEV':[1,1]=DB0:[1,1]NOT.TSK
PIP 'DEV':[1,1]=DB0:[1,1]HNDLIB.*, IASSYM.STB, RSXMAC.SML
PIP 'DEV':[1,1]=DB0:[1,1]SYSLIB.OLB, SYSRES.*
PIP 'DEV':[1,1]=DB0:[1,1]IASCOM.*
PIP 'DEV':[1,1]=DB0:[1,1]TRACE.*, ODT.*
;
;	DELETE ALL [1,2] MESSAGE FILES ETC. AND COPY THE NEW
;
PIP 'DEV':[1,2]*.*;*/DE
PIP 'DEV':[1,2]=DB0:[1,2]*.*
;
;	ALL FILES ON 'DEV':([1,3], [1,4]) WILL BE DELETED
;
PIP 'DEV':[1,3]*.*;*/DE
PIP 'DEV':[1,4]*.*;*/DE
;
;	NEW USERS FILE?
;
.ASK UPF COPY THE USER PROFILE FILE
.IFF UPF .GOTO 100
PIP 'DEV':[1,100]=DB0:[1,100]PDSUPF.DAT
.100:
;
;	COPY UTILITIES TO 'DEV':[350,1]
;
.ASK	 UTIL COPY [300,*] UTILITIES TO 'DEV':[350,1]
.IFF UTIL .GOTO 150
UFD 'DEV':[350,1]
PIP 'DEV':[350,1]/NV=DB0:[300,*]*.TSK
PIP 'DEV':[350,1]*.TSK/PU
PIP 'DEV':[350,1]*.*;*/PR/WO:RWE/FO
.150:
;
;	CREATE TARGET GEN FILE ON 'DEV'
;
.OPEN 'DEV':[11,17]TARGET.COR
.DATA 'DEV':[11,17]SYSGEN'DEV'.CMD/-AU,='DEV':[11,17]SYSGEN.CMD
.DATA -/SYSGEN.CMD/,.
.DATA ;	[11,17]SYSGEN'DEV'.CMD
.DATA -/=TARGETGEN=/,.
.DATA TARGET='DEV':[11,17]
.DATA /
.CLOSE
SLP @'DEV':[11,17]TARGET.COR
PIP 'DEV':[11,17]TARGET.COR;*/DE
;
;	PROCEED TO SYSGEN PHASE 1 ON TARGET DEVICE ('DEV':)
;
.ASK GO OK TO PROCEED TO PHASE 1
.IFF GO .GOTO END
;
;	AFTER THE MESSAGE *** EN OF SYSTEM GENERATION PHASE 2 ***
;	PRINTS OUT, ENTER THE FOLLOWING -
; ^C
; MCR> BOOT [11,17]/WB
; MCR> SAVE
;
;	THE SYSTEM WILL BE BOOTED FROM 'DEV':.  WHEN THIS COMPLETES
;	DISMOUNT ALL VOLUMES AND HALT THE MACHINE (^P H) TO AVOID
;	CONFUSION OF DISK PACKS (I.E. SYSTEM RUNNING NOT ON DB0:)
;
REM @[11,17]SYSGENREM
;
SG1 @'DEV':[11,17]SYSGEN'DEV'
;
BOO 'DEV':[11,17]
.GOTO END
;
.WRONGD:
;	DB0 MUST NOT BE USED AS TARGET DISK DRIVE
.ASK AGAIN DO YOU WISH TO TRY AGAIN
.IFT AGAIN .GOTO 10
;
.END:
;	END OF TARGETGEN.CMD
