#!/bin/rc #makes a fossil on /dev/sdC1 from a given fossil/last and clones most of 9fat from /dev/sdC0 if (~ $#1 0) { echo USAGE: makefossildisk fossillastfile exit } 9fat: disk/mbr -m /386/mbr /dev/sdC1/data disk/fdisk -baw /dev/sdC1/data disk/prep -bw -a^(9fat nvram fossil swap) /dev/sdC1/plan9 disk/format -b /386/pbslba -d -r 2 /dev/sdC1/9fat /n/9fat/9load /n/9fat/9pcf /n/9fat/9pccpuf /n/9fat/9gcpuf /n/9fat/plan9.ini cp /dev/sdC0/nvram /dev/sdC1/nvram OLDFOSSIL=`{cat $1 |awk -F : '{print $2}'} fossil/flfmt -v $OLDFOSSIL /dev/sdC1/fossil fossil/conf /dev/sdC0/fossil | fossil/conf -w /dev/sdC1/fossil