#!/bin/sh -e
#
# reportbug helper for dosemu
#

CONF=/etc/dosemu/dosemu.conf

if [ -r "$CONF" ]; then
        cat $CONF >&3
else
	echo "$CONF does not exist!" >&3
fi

LOCATION=/etc/freedos

echo -n 'Please enter the location of a DOS config.sys/autoexec.bat to be associated with this bug report '
read -p "[default: $LOCATION]: "

if [ ! -z "$REPLY" ]; then LOCATION=$REPLY; fi

# Check for both uppercase and lowercase versions of the files since the
# filesystem may be case sensitive.
echo >&3
if [ -r "$LOCATION/config.sys" ]; then
	cat "$LOCATION/config.sys" >&3
elif [ -r "$LOCATION/CONFIG.SYS" ]; then
	cat "$LOCATION/CONFIG.SYS" >&3
else
	echo "$LOCATION/config.sys does not exist!" >&3
fi

echo >&3
if [ -r "$LOCATION/autoexec.bat" ]; then
	cat "$LOCATION/autoexec.bat" >&3
elif [ -r "$LOCATION/AUTOEXEC.BAT" ]; then
	cat "$LOCATION/AUTOEXEC.BAT" >&3
else
	echo "$LOCATION/autoexec.bat does not exist!" >&3
fi

