xref: /minix3/crypto/external/bsd/openssl/dist/util/deltree.com (revision ebfedea0ce5bbe81e252ddf32d732e40fb633fae)
1*ebfedea0SLionel Sambuc$! DELTREE.COM
2*ebfedea0SLionel Sambuc$
3*ebfedea0SLionel Sambuc$ call deltree 'p1'
4*ebfedea0SLionel Sambuc$ exit $status
5*ebfedea0SLionel Sambuc$
6*ebfedea0SLionel Sambuc$ deltree: subroutine ! P1 is a name of a directory
7*ebfedea0SLionel Sambuc$	on control_y then goto dt_STOP
8*ebfedea0SLionel Sambuc$	on warning then goto dt_exit
9*ebfedea0SLionel Sambuc$	_dt_def = f$trnlnm("SYS$DISK")+f$directory()
10*ebfedea0SLionel Sambuc$	if f$parse(p1) .eqs. "" then exit
11*ebfedea0SLionel Sambuc$	set default 'f$parse(p1,,,"DEVICE")''f$parse(p1,,,"DIRECTORY")'
12*ebfedea0SLionel Sambuc$	p1 = f$parse(p1,,,"NAME") + f$parse(p1,,,"TYPE")
13*ebfedea0SLionel Sambuc$	_fp = f$parse(".DIR",p1)
14*ebfedea0SLionel Sambuc$ dt_loop:
15*ebfedea0SLionel Sambuc$	_f = f$search(_fp)
16*ebfedea0SLionel Sambuc$	if _f .eqs. "" then goto dt_loopend
17*ebfedea0SLionel Sambuc$	call deltree [.'f$parse(_f,,,"NAME")']*.*
18*ebfedea0SLionel Sambuc$	goto dt_loop
19*ebfedea0SLionel Sambuc$ dt_loopend:
20*ebfedea0SLionel Sambuc$	_fp = f$parse(p1,".;*")
21*ebfedea0SLionel Sambuc$	if f$search(_fp) .eqs. "" then goto dt_exit
22*ebfedea0SLionel Sambuc$	set noon
23*ebfedea0SLionel Sambuc$	set file/prot=(S:RWED,O:RWED,G:RWED,W:RWED) '_fp'
24*ebfedea0SLionel Sambuc$	set on
25*ebfedea0SLionel Sambuc$	delete/nolog '_fp'
26*ebfedea0SLionel Sambuc$ dt_exit:
27*ebfedea0SLionel Sambuc$	set default '_dt_def'
28*ebfedea0SLionel Sambuc$	goto dt_end
29*ebfedea0SLionel Sambuc$ dt_STOP:
30*ebfedea0SLionel Sambuc$	set default '_dt_def'
31*ebfedea0SLionel Sambuc$	stop/id=""
32*ebfedea0SLionel Sambuc$	exit
33*ebfedea0SLionel Sambuc$ dt_end:
34*ebfedea0SLionel Sambuc$	endsubroutine
35