mkdisk 499 Bytes
#!/bin/csh -f
# $1 is build file
# $2 is diskfile 
# $3 is free space size in 512b blocks

if ($#argv != 3) then
  echo "Usage: mkdisk: buildfile output freespace(512byte blocks)"
  exit
endif

if (${?MKFS_BASE}) then
  echo "Using $MKFS_BASE to find binaries"
else
  echo "Using /hive/bin for binaries"
  set MKFS_BASE=/hive/bin
endif

${MKFS_BASE}/builddisk $1 > $1.mkfs1
${MKFS_BASE}/adjsize   $1.mkfs1 $1.mkfs $3
rm $1.mkfs1
rm -f $2
${MKFS_BASE}/mkfs $2 $1.mkfs
${MKFS_BASE}/vh $2
chmod a-w $2