diff --git a/lib/util.sh b/lib/util.sh index a66eb81..daabba9 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -61,13 +61,13 @@ function get_cpu_vendor() { if [[ -z "${CPU_VENDOR}" ]] || [[ "${CPU_VENDOR}" == 'autodetect' ]]; then # If run virtual environment (e.g. VirtualBox) then no CPU microcode is required - if cat /proc/cpuinfo | grep '^flags.*hypervisor' >/dev/null; then + if grep '^flags.*hypervisor' /proc/cpuinfo >/dev/null; then echo 'Detected virtual environment.' CPU_VENDOR='none' else local vendor_id - vendor_id=$(cat /proc/cpuinfo | grep vendor_id | head -1 | sed 's|vendor_id\s*:\s*||') + vendor_id=$(grep vendor_id /proc/cpuinfo | head -1 | sed 's|vendor_id\s*:\s*||') if [ "${vendor_id}" = 'AuthenticAMD' ]; then CPU_VENDOR='amd'