From ee774d258490e6bdfac4d31fd1045da77d654a82 Mon Sep 17 00:00:00 2001 From: Yannick Mauray Date: Tue, 5 Oct 2021 20:45:51 +0200 Subject: [PATCH] Fixed : problem with the generated shell script. --- quickemu | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/quickemu b/quickemu index ad9aada..6da147f 100755 --- a/quickemu +++ b/quickemu @@ -679,8 +679,15 @@ function vm_boot() { ${USB_PASSTHROUGH}) fi + # The OSK parameter contains parenthesis, they need to be escaped in the shell scripts + # The vendor name, Wimpys World, contains a space. It needs to be double-quoted. + SHELL_ARGS="${args[*]}" + SHELL_ARGS="${SHELL_ARGS//(/\\(}" + SHELL_ARGS="${SHELL_ARGS//)/\\)}" + SHELL_ARGS="${SHELL_ARGS//Wimpys World/\"Wimpys World\"}" + echo "#!/usr/bin/env bash" > "${VMDIR}/${VMNAME}.sh" - echo "${QEMU}" "${args[@]}" >> "${VMDIR}/${VMNAME}.sh" + echo "${QEMU}" "${SHELL_ARGS}" >> "${VMDIR}/${VMNAME}.sh" ${QEMU} "${args[@]}" > "${VMDIR}/${VMNAME}.log" & echo -e " - Process: On guest: killall ${VMNAME}\t(if a forced kill is required)"