#!/bin/sh

if [ ! -f initrd_idiot.img ] ; then
	echo "Hey! You're missing an initial ramdisk. Attempting to create it..."
	helper-scripts/geninitrd
fi

if [ -f initrd.img-idiot ] ; then
	if [ -f vmlinuz_idiot ] ; then
		qemu-system-x86_64 --kernel vmlinuz_idiot  --initrd initrd_idiot.img --append 'quiet'
	else
		echo "Hey, you forgot to provide a linux kernel at vmlinuz_idiot. I need a kernel to boot."
	fi
fi
