#! /bin/bash

export DOSEMU2_COMCOM_DIR=~/proj/comcom32
rm -f commands/autoexec.bat
rm -f commands/fdautoem.bat
make clean
(($?)) && exit $?
./default-configure --disable-fdpp --prefix=$HOME/local.3 --sysconfdir=$HOME/local.3/etc --mandir=$HOME/local.3/share/man --datarootdir=$HOME/local.3/share
(($?)) && exit $?
make
(($?)) && exit $?
[[ ! -f commands/autoexec.bat ]] && cp ~/local.new/share/dosemu/dosemu2-cmds-0.3/autoexec.bat -ia commands/
[[ ! -f commands/fdautoem.bat ]] && cp ~/local.new/share/dosemu/dosemu2-cmds-0.3/fdautoem.bat -ia commands/
make install
(($?)) && exit $?
rm -rf status.tst
bin/dosemu -K "$PWD" -E "test3.bat"
stty sane
if [[ -f status.tst ]]
then
  exit 1
else
  exit 0
fi
