#!/bin/sh

vdisk="Ultrix.vdk"
exec="gxemul"
exec_path=`whereis "$exec"|awk '{print $2}'`

if [ ! -e "$vdisk" ]
then
	if [ -e "$vdisk".gz ]
	then
		echo "Unpacing "$vdisk" ..."
		gzip -d "$vdisk".gz
	else
		echo "$vdisk does not exist!"
		exit 127
	fi
fi

if [ -z "$exec_path" ]
then
        echo "$exec not found"
	echo "Download and compile from http://gxemul.sourceforge.net/"
else
	"$exec_path" -X -e 3max -d "$vdisk" -j vmunix -M 128
fi

