Add linux cpu functionality to eponymous script
This commit is contained in:
parent
4e959df57b
commit
5085b8bb48
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue