#!/bin/sh

#
if [ $# != 2 ]; then
    printf "Usage: $0 image-file device\n"
    printf "\nExample:\n\n$0 FreeBSD-8.3-RELEASE-i386-memstick.img /dev/da0\n"
    printf "\n(Use da0, not da0a, da0s1, etc.)\n"
    exit 1
fi

image=$1
dev=$2

if [ `echo $dev | cut -c 1-4` != '/dev' ]; then
    dev="/dev/$dev"
fi

printf "Make sure $dev is NOT mounted.  Press return when ready..."
read junk
set -x
# dd if=$image of=$dev bs=10240 conv=sync
# 9.0 install docs
dd if=$image of=$dev bs=64k conv=sync

