mirror of
https://github.com/forth-ev/VolksForth.git
synced 2024-09-07 20:54:27 +00:00
- add first test for including an .fth file - add generic rules to convert lowercase .fb files to .fth files - check in the tools/echo-toupper/tolower.py files that I left out earlier
38 lines
849 B
Bash
Executable File
38 lines
849 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
set -x
|
|
|
|
emulatordir="$(realpath --relative-to="$PWD" "$(dirname "${BASH_SOURCE[0]}")")"
|
|
basedir="$(realpath --relative-to="$PWD" "${emulatordir}/..")"
|
|
|
|
forth="$1"
|
|
include_filename="$2"
|
|
include_basename="${include_filename%.*}"
|
|
forthcmd=""
|
|
exit=""
|
|
bye=""
|
|
if [ -n "${include_basename}" ]; then
|
|
forthcmd="include ${include_filename}"
|
|
logname="${include_basename}.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=""
|
|
if [ -n "${forth}" ]; then
|
|
auto_c="-c"
|
|
autocmd="${forth} path f:\\;f:\\src;f:\\tests ${forthcmd} ${bye}"
|
|
fi
|
|
|
|
dosbox -c "mount f ${basedir}" -c "f:" "${auto_c}" "${autocmd}" $exit
|
|
|
|
if [ -n "${include_basename}" ]; then
|
|
dos2unix -n "${doslogname}" "${logname}"
|
|
fi
|