mirror of
https://github.com/KittyKatt/screenFetch.git
synced 2026-01-09 22:37:57 -05:00
Merge pull request #165 from expeditiousRubyist/master
Added better support for cpu info on Android devices.
This commit is contained in:
@@ -792,6 +792,9 @@ detectcpu () {
|
||||
elif [ "$distro" == "OpenBSD" ]; then cpu=$(sysctl -n hw.model | sed 's/@.*//')
|
||||
else
|
||||
cpu=$(awk 'BEGIN{FS=":"} /model name/ { print $2; exit }' /proc/cpuinfo | sed 's/ @/\n/' | head -1)
|
||||
if [ -z "$cpu" ]; then
|
||||
cpu=$(awk 'BEGIN{FS=":"} /Hardware/ { print $2; exit }' /proc/cpuinfo)
|
||||
fi
|
||||
if [ -z "$cpu" ]; then
|
||||
cpu=$(awk 'BEGIN{FS=":"} /^cpu/ { gsub(/ +/," ",$2); print $2; exit}' /proc/cpuinfo | sed 's/, altivec supported//;s/^ //')
|
||||
if [[ $cpu =~ ^(PPC)*9.+ ]]; then
|
||||
|
||||
Reference in New Issue
Block a user