mirror of
https://github.com/forth-ev/VolksForth.git
synced 2024-09-07 20:54:27 +00:00
a good deal of Makefile and run-in-dosbox.sh refactoring, e.g. the introduction of a dosfiles/ subdir in which dosbox runs, to eliminate the need for the Forth PATH word to run tests.
31 lines
544 B
Bash
Executable File
31 lines
544 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
forth="$1"
|
|
forthcmd="$2"
|
|
exit=""
|
|
bye=""
|
|
if [ -n "${forthcmd}" ]; then
|
|
logname="output.log"
|
|
doslogname="$(echo ${logname}|tr '[:lower:]' '[:upper:]')"
|
|
rm -f "${logname}" "${doslogname}"
|
|
if [ -z "${KEEPEMU}" ]; then
|
|
exit="-c exit"
|
|
bye="bye"
|
|
fi
|
|
fi
|
|
|
|
auto_c=""
|
|
autocmd=""
|
|
pathcmd=""
|
|
if [ -n "${forth}" ]; then
|
|
auto_c="-c"
|
|
if [ -n "${FORTHPATH}" ]; then
|
|
pathcmd="path ${FORTHPATH}"
|
|
fi
|
|
autocmd="${forth} ${pathcmd} ${forthcmd} ${bye}"
|
|
fi
|
|
|
|
dosbox -c "mount f ." -c "f:" "${auto_c}" "${autocmd}" $exit
|