From 67ffb832e693997e159015b4f8e9aad1b4e32560 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Fri, 17 May 2024 13:18:19 +0100 Subject: [PATCH] fix: handle multiple CPU models returned via lscpu; Asahi Linux for example --- quickemu | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/quickemu b/quickemu index 3f9f425cc7..17ad0fc588 100755 --- a/quickemu +++ b/quickemu @@ -240,9 +240,11 @@ function get_cpu_info() { fi else if [ "^Model name:" == "${INFO_NAME}" ]; then - lscpu | grep "${INFO_NAME}" | cut -d':' -f2 | sed -e 's/^[[:space:]]*//' + for MODEL_NAME in $(IFS=$'\n' lscpu | grep "${INFO_NAME}" | cut -d':' -f2 | sed -e 's/^[[:space:]]*//'); do + echo -n "${MODEL_NAME} " + done else - lscpu | grep -E "${INFO_NAME}" | cut -d':' -f2 | sed 's/ //g' + lscpu | grep -E "${INFO_NAME}" | cut -d':' -f2 | sed 's/ //g' | sort -u fi fi }