plan9fox/rc/bin/inst/copydist
2011-04-12 15:53:55 +00:00

32 lines
715 B
Bash
Executable file

#!/bin/rc
# prereq: mountdist
# desc: copy the distribution into the file system
switch($1){
case checkready
if(! test -d /n/dist/dist/replica){
copydist=notdone
export copydist
exit
}
if(test -f /n/newfs/dist/replica/didplan9){
copydist=done
export copydist
exit
}
case go
inst/watchfd applylog 0 `{ls -l /n/dist/dist/replica/plan9.log | awk '{print $6}'} 'Installing file system' &
replica/pull -c / /rc/bin/inst/replcfg
if(~ $status '' *conflicts || test -f /n/newfs/dist/replica/didplan9witherrors)
>/n/newfs/dist/replica/didplan9
if not
>/n/newfs/dist/replica/didplan9witherrors
case checkdone
if(! test -f /n/newfs/dist/replica/didplan9){
copydist=notdone
export copydist
}
}