Merge pull request #165 from expeditiousRubyist/master

Added better support for cpu info on Android devices.
This commit is contained in:
Brett Bohnenkamper
2014-11-11 22:05:47 -10:00

View File

@@ -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