git: 9front

ref: 46fe8f67bc7666ccd5b3d385e57066a2e57aeb79
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 -f /n/dist/LICENSE){
		copydist=notdone
		export copydist
		exit
	}
	if(test -f /n/newfs/LICENSE && test -f /tmp/copydone){
		copydist=done
		export copydist
		exit
	}
case go
	rm -f /tmp/copydone
	disk/mkfs -z 16384 -p -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
	}
}