From d1a984ff128358bb13c1e57252ad168c2223e6d3 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 09:53:27 +0000 Subject: [PATCH] Minor code cleanup --- quickemu | 10 +++++----- quickget | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/quickemu b/quickemu index 9a1e0b0..e5bfc35 100755 --- a/quickemu +++ b/quickemu @@ -1,8 +1,7 @@ #!/usr/bin/env bash export LC_ALL=C -if ((BASH_VERSINFO[0] < 4)) -then +if ((BASH_VERSINFO[0] < 4)); then echo "Sorry, you need bash 4.0 or newer to run this script." exit 1 fi @@ -992,8 +991,8 @@ function vm_boot() { -device tpm-tis,tpmdev=tpm0) fi - if [ -n "$extra_args" ]; then - args+=($extra_args) + if [ -n "${extra_args}" ]; then + args+=("${extra_args}") fi # The OSK parameter contains parenthesis, they need to be escaped in the shell @@ -1078,6 +1077,7 @@ bridge="" cpu_cores="" disk_img="" disk_size="" +extra_args="" fixed_iso="" floppy="" guest_os="linux" @@ -1090,7 +1090,6 @@ ram="" secureboot="off" tpm="off" usb_devices=() -extra_args="" BRAILLE="" DELETE_DISK=0 @@ -1112,6 +1111,7 @@ VMDIR="" VMNAME="" VMPATH="" +# shellcheck disable=SC2155 readonly LAUNCHER=$(basename "${0}") readonly DISK_MIN_SIZE=$((197632 * 8)) readonly VERSION="3.12" diff --git a/quickget b/quickget index c44459b..6cf0af3 100755 --- a/quickget +++ b/quickget @@ -1,4 +1,5 @@ #!/usr/bin/env bash +export LC_ALL=C # Here the quick 'n dirty guide to adding a new OS to quickget #