shithub: riscv

ref: 29c7ca80c9df8f805217be9bb9a9a083ff12912d
dir: /rc/bin/inst/copydist/

View raw version
#!/bin/rc

# prereq: mountdist
# desc: copy the distribution into the file system

switch($1){
case checkready
	if(! test -d /n/dist/dist/plan9front){
		copydist=notdone
		export copydist
		exit
	}
	if(test -d /n/newfs/dist/plan9front && test -f /tmp/copydone){
		copydist=done
		export copydist
		exit
	}
case go
	rm -f /tmp/copydone
	disk/mkfs -z 16372 -U -s /n/dist -d /n/newfs /sys/lib/sysconfig/proto/allproto
	touch /tmp/copydone

case checkdone
	if(! test -f /tmp/copydone){
		copydist=notdone
		export copydist
	}
}