CeDOS - Commit 85d383ca

run.sh: Refactor script Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
Celina Sophie Kalus
Thu, 24 Jul 2025 00:32:55 +0200
1 files changed, 17 insertions(+), 3 deletions(-)

jump to
M run.shrun.sh

@@ -1,5 +1,19 @@

-if [ -z "$QEMU_VNC" ]; then - qemu-system-i386 -drive index=0,if=floppy,format=raw,file=${1} -m 64 -serial file:logs/serial.log -monitor stdio -no-reboot -d int,cpu_reset,exec,in_asm -vga std 2> logs/run_err.log +QEMU_EXE="$(which qemu-system-i386)" +QEMU_ARGS="" + +QEMU_ARGS="${QEMU_ARGS} -drive index=0,if=floppy,format=raw,file=${1}" +QEMU_ARGS="${QEMU_ARGS} -m 64 -serial file:logs/serial.log" +QEMU_ARGS="${QEMU_ARGS} -monitor stdio -no-reboot" +QEMU_ARGS="${QEMU_ARGS} -d int,cpu_reset,exec,in_asm" + +if [ ! -z "$QEMU_VNC" ]; then + QEMU_ARGS="${QEMU_ARGS} -vnc :0" +fi + +if [ -z "$QEMU_NOGRAPHIC" ]; then + QEMU_ARGS="${QEMU_ARGS} -vga std" else - qemu-system-i386 -drive index=0,if=floppy,format=raw,file=${1} -m 64 -serial file:logs/serial.log -monitor stdio -no-reboot -d int,cpu_reset,exec,in_asm -vga std -vnc :0 2> logs/run_err.log + QEMU_ARGS="${QEMU_ARGS} -nographic" fi + +"${QEMU_EXE}" ${QEMU_ARGS} 2> logs/run_err.log