#! /bin/bash
# bput: copy blocks from file to bootable colorForth floppy
#
if [ $# != 2 ]; then
  echo "Usage: ${0##*/} block filename"
  exit 1
fi
temp=(`ls -s $2`)
rest=$(($1 + ${temp[0]}))
dd if=color.com of=temp_blocks bs=1024 skip=$rest
dd of=color.com bs=1024 seek=$1 if=$2
dd if=temp_blocks of=color.com bs=1024 seek=$rest
rm temp_blocks
