Merge pull request #1188 from konimex/arm

CPU [Linux/ARM]: Use Hardware field directly
This commit is contained in:
black 2019-02-03 22:17:15 +02:00 committed by GitHub
commit e8939d58cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 7 deletions

View File

@ -1805,13 +1805,9 @@ get_cpu() {
;;
*)
cpu="$(awk -F ': | @' '/model name|Processor|^cpu model|chip type|^cpu type/ {
printf $2;
exit
}' "$cpu_file")"
[[ "$cpu" == *"processor rev"* ]] && \
cpu="$(awk -F':' '/Hardware/ {print $2; exit}' "$cpu_file")"
cpu="$(awk -F ': | @' \
'/model name|Hardware|Processor|^cpu model|chip type|^cpu type/ {
printf $2; exit}' "$cpu_file")"
;;
esac