Introduce MOUNTPOINT env var in run-in-dosbox.sh

This commit is contained in:
Philip Zembrod 2022-06-08 21:02:12 +02:00
parent 6011ac6638
commit 8ddbf4c37b

View File

@ -4,6 +4,15 @@ set -e
forth="$1"
forthcmd="$2"
pathcmd=""
if [ -n "${FORTHPATH}" ]; then
pathcmd="path ${FORTHPATH}"
fi
f_mountpoint="."
if [ -n "${F_MOUNTPOINT}" ]; then
f_mountpoint="${F_MOUNTPOINT}"
fi
exit=""
bye=""
if [ -n "${forthcmd}" ]; then
@ -18,13 +27,9 @@ 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
dosbox -c "mount f ${f_mountpoint}" -c "f:" "${auto_c}" "${autocmd}" $exit