#!/bin/bash
RE="^[0-9]+$"
HOME_PATH="$HOME/.8086tiny"
if ! [[ $1 =~ $RE ]]; then
	echo Example usage for a blank 40 MB image:
	echo 8086tiny-newimage 40
else
	if ! [ -d $HOME_PATH ] ; then
		mkdir $HOME_PATH
	fi
	echo Creating blank hd.img of size: $1 MB...
	dd if=/dev/zero of=$HOME_PATH/hd.img bs=1024K count=$1
	echo
	echo Now use fdisk to partition the image within the emulator.
fi
