#!/bin/sh -e
#
# Wrapper script for Bochs. Copyright (c) 2001, 2002 Robert Millan
#
# Protected by GNU GPL, See /usr/share/common-licenses/GPL for license terms

# this is for the GUEST variable in bochsrc
if test -z "$GUEST" ; then GUEST=guest ; fi

# checking wether bochsrc exists
if ! test -e `pwd`/.bochsrc && ! test -e $HOME/.bochsrc ; then
  echo ; echo "~/.bochsrc not found." ; echo
  echo -n "Do you want to run 'bochsconf' for automated configuration? [Y/n] "
  read FOO
  case "$FOO" in n*|N*) ;; *) echo ; bochsconf ;; esac
fi

# now we run bochs
GUEST=$GUEST bochs-bin -q $@
