.; inn.cmd - create a object library
.;---------------WARNING expect lbr to be installed ------------
.; p1	library name (full)					foo.olb
.; p2	library purpose				crashing_milnet_subroutines
.; #2	file to write backout commands to
.; #3	file to write requirements
.;
.; backout:	delete the .olb file only if we created it here
.; cleanup:	-
.;
	.enable substitution
	.enable escape
	.data #3 you will make or use 'p1' for 'p2'
.;	@ini ...lbr $lbr DEC_program_librarian
.; above command repressed to attempt to reduce ind nesting depth
.retry:
	.testfile 'p1'
	.if <filerr> = 1 .goto exists
	.ask ok may I create program library 'p1'
	.ift ok .goto make
	; PROBLEM -- I need to use 'p1' as a program library
	; 'p1' would hold 'p2'
	.asks junk type <ESCAPE> to continue regardless, <RETURN> to retry
	.ift <escape> .goto banzai
	; PAUSING so you may correct the problem before retrying
	.pause
	.goto retry
.banzai:
.make:
.retry1:
	lbr 'p1'/cr
	.if <exstat> = <succes> .goto made
	; PROBLEM - could not create program library 'p1'
	; 'p1' would hold 'p2'
	.asks junk type <ESCAPE> to continue regardless, <RETURN> to retry
	.ift <escape> .goto gungho
	; PAUSING so you may correct the problem before retrying
	.pause
	.goto retry1
.gungho:
.made:
	.testfile 'p1'
	.data #2 pip '<filspc>'/de/nm
.exists:
	.exit <succes>
