- 📅 2026-09-28T10:31:25.715Z
- 👁️ 95 katselukertaa
- 🔓 Julkinen
#!/bin/sh
set -eu
while [ $# -gt 0 ]; do
case "$1" in
-conf) cfg=$2; shift 2 ;;
*) shift ;;
esac
done
: "${cfg:?Missing DOSBox config}"
while IFS= read -r line; do
case "$line" in
'mount '*)
set -- $line
[ "$2" = "-z" ] && continue
drive=${2%:}
eval "EMU2_DRIVE_${drive}=\$3"
export "EMU2_DRIVE_${drive}"
;;
[A-Za-z]:)
export EMU2_DEFAULT_DRIVE="$line"
;;
'cd '*)
export EMU2_CWD="${line#cd }"
;;
'config '*|'exit'|'')
;;
*)
set -- $line
exec emu2 "$@"
;;
esac
done < "$cfg"
echo "dosbox shim: no DOS command found" >&2
exit 1