fix(darwin): convert CPU flags from Linux format to Darwin format
This commit is contained in:
parent
c3792c61f4
commit
a4818025d8
4
quickemu
4
quickemu
|
@ -246,7 +246,9 @@ function get_cpu_info() {
|
|||
function check_cpu_flag() {
|
||||
local HOST_CPU_FLAG=""
|
||||
if [ "${OS_KERNEL}" == "Darwin" ]; then
|
||||
HOST_CPU_FLAG="${1}^^"
|
||||
# Convert the flag to uppercase and replace _ with .
|
||||
HOST_CPU_FLAG="${1^^}"
|
||||
HOST_CPU_FLAG="${HOST_CPU_FLAG//_/.}"
|
||||
if sysctl -n machdep.cpu.features | grep -o "${HOST_CPU_FLAG}" > /dev/null; then
|
||||
return 0
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue