Unverified Commit 3541f044 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

feat: Check CPU vendor (#766)

parent c5519535
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -32,6 +32,12 @@ if [[ "$GPU" != [Yy1]* ]] || [[ "$ARCH" != "amd64" ]]; then
  return 0
fi

CPU_VENDOR=$(lscpu | awk '/Vendor ID/{print $3}')

if [[ "$CPU_VENDOR" != "GenuineIntel" ]]; then
  return 0
fi

[[ "${VGA,,}" == "virtio" ]] && VGA="virtio-vga-gl"
DISPLAY_OPTS="-display egl-headless,rendernode=$RENDERNODE"
DISPLAY_OPTS+=" -device $VGA"
+1 −0
Original line number Diff line number Diff line
@@ -147,6 +147,7 @@ cpu() {
  cpu="${cpu// Core TM/ Core}"
  cpu="${cpu// with Radeon Graphics/}"
  cpu="${cpu// with Radeon Vega Graphics/}"
  cpu="${cpu// with Radeon Vega Mobile Gfx/}"

  [ -z "${cpu// /}" ] && cpu="Unknown"