Add linux cpu functionality to eponymous script

This commit is contained in:
mmcwilliams 2020-05-23 00:12:28 -04:00
parent 4e959df57b
commit 5085b8bb48
1 changed files with 1 additions and 1 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
CPU=-1
CPU=`cat /proc/cpuinfo | grep "model name" | head -n 1 | awk '{for (i=4; i<=NF; i++) print $i}'`
elif [[ "$OSTYPE" == "darwin"* ]]; then
CPU=`sysctl -a | grep machdep.cpu.brand_string | awk '{for (i=2; i<=NF; i++) print $i}'`
else