.enable substitution
.sets me <filspc>
@lb:[1,2]needvt
@lb:[3,54]quicksand




clr
;
; I am 'me'. 
;
; I do a backup from your '<uic>' disk to a magnetic tape.
; I use BRU, the Backup Restore Utility.
; I will attempt to put you backup information AT THE END OF THE TAPE
; after any information the tape now holds.
;
.sets tap "ms:"
.ask maybe Shall I start to use the tape drive "'tap'"
.ift maybe .goto trytry
;
; You lose. I cannot use any other tape drive. No backup will be done.
;
/
.trytry:
.try:
@lb:[1,2]getdev 'tap'





clr
; I now have access to the tape drive "'tap'".
;
; I do a backup from your '<uic>' disk to a magnetic tape.
; I use BRU, the Backup Restore Utility.
; I will attempt to put you backup information AT THE END OF THE TAPE
; after any information the tape now holds.
;
.ask maybe Do you want to back up selected files of '<uic>'
.iff maybe .exit
.testdevice 'tap'
.parse <exstri> "," fiz cw1 cw2 cw3 cw4 atrs
.test atrs "MTD,"
.if <strlen> = 0 .goto dism
dmo 'tap'/dev/lock=s
@lb:[1,2]ballsup/lo / Dismount Tape Drive prior to Mounting Foreign
.dism:
.testdevice 'tap'
.parse <exstri> "," fiz cw1 cw2 cw3 cw4 atrs
.test atrs "FOR,"
.if <strlen> > 0 .goto moufor
clr
;
; We are now ready to mount the tape.
;
; Before I mount the tape , please confirm:
;
;	(1)	There is a tape in the tape drive.
;	(2)	The tape drive is switched on (red ON switch glows).
;	(3)	The tape is loaded past begin-of-tape (UNLOAD light is dim).
;	(4)	The tape drive connects to the computer (ON-LINE light glows).
;	(5)	The tape has a write-enable ring. (WRITE EN light glows).
;
.ask maybe Are all the above checks OK
.iff maybe .goto try
mou 'tap'/for
@lb:[1,2]ballsup / Mount Tape drive foriegn to use for backup
.moufor:
.ifnins ...bru ins $bru
@lb:[1,2]ballsup/lo / Install the backup & restore Utility (BRU)
clr
;
;	If you answer [ESCAPE] to the following question, all
;	files in '<uic>' will be backed up to tape, regardless
;	of the last time they were modified.
;
.sets timsel ""
.enable escape
.asks date After what date shall I backup
.iff <escape> .sets timsel "/revised:after:"+date
.sets apend "/app"
.frunt:
clr
;
;
;		B a c k i n g   U p
;
;
bru/err:0/ver/mou'apend''timsel' sy:'<uic>' 'tap''<uic>'
.if <exstat> = <succes> .goto ok80
.if apend = "/rew" .goto die79
;
; OH SHIT OH DEAR! The BRU program could not append information to the
; end of the tape. We could still try to overwrite whatever information
; is at the front of the tape. You will lose the data on the tape,
; but BRU will be much happier and your backup might succeed.
;
; If you answer YES, you WILL lose all the information that is now
; on your tape, but you might have a sucessful backup by doing so.
;
.sets apend "/rew"
.ask maybe Shall we risk BRUing to the front of the tape
.ift maybe .goto frunt
.die79:
@lb:[1,2]ballsup/lo / Run BRU to backup your disk file(s)
.ok80:
dmo ms:/lock=s
@lb:[1,2]ballsup/lo / Dismount (& rewind) tape after successful BRU
;
;
;-------------------------- YOU WIN ----------------------------------
;
;
;
;
;
;
;
;
;		BRU   B a c k u p   D o n e
;
;
;
;
;
;
;
