home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
disks
/
disk374.lzh
/
Mat
/
SASS
< prev
next >
Wrap
Text File
|
1990-10-08
|
1KB
|
26 lines
.K dest
.BRA {
.KET }
;; SASS -- Preserves current assigns in a re-executable script.
run assign >PIPE:SASS_0
run ElideS <PIPE:SASS_0 >PIPE:SASS
echo >{dest$re-assign} "failat 25"
mat >>{dest$re-assign} "~(T|S|L|C|LIBS|DEVS|FONTS|UTIL|SYS)^ ^~(Volume):#?" "assign ^0: ^Q^2^Q" PIPE:SASS
echo >>{dest$re-assign} "failat 10"
protect {dest$re-assign} +S
;; The output of the ASSIGN (list) command is fed to a PIPE. This is
;; processed by an intermediate program ElideS, which takes out the many
;; extra spaces ASSIGN puts in its output (which is one thing Mat has
;; difficulty with) and passes it on to Mat through another pipe.
;; Mat's Pattern argument has two negations ('~') that prevent it matching
;; any of the standard assigns, or other superfluous lines; there are
;; also two slice marks ('^') that chop out the assigned name (slice 0) and
;; its directory (slice 2).
;; The template argument generates appropriate assign commands to
;; reproduce these asociations.
;; It would have been possible to replace the two "echo" lines with
;; labels in the Mat command, but it's probably long enough already...