Skip to content

Commit

Permalink
fix: handle multiple CPU models returned via lscpu; Asahi Linux for e…
Browse files Browse the repository at this point in the history
…xample
  • Loading branch information
flexiondotorg committed May 17, 2024
1 parent e258fc4 commit 9976292
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions quickemu
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 9976292

Please sign in to comment.