add loongarch
This commit is contained in:
parent
ac7be6d3d1
commit
3253d4cbcc
1 changed files with 14 additions and 3 deletions
17
neofetch
17
neofetch
|
@ -2207,13 +2207,24 @@ get_cpu() {
|
|||
;;
|
||||
|
||||
"arm"* | "aarch64")
|
||||
cpu="$(lscpu | awk -F': ' '/Vendor ID/ {print $2; exit}' ) $(lscpu | awk -F': ' '/Model name/ {print $2; exit}')"
|
||||
if [[ $(trim "$distro") == Android* ]]; then
|
||||
# Android roms have modified cpuinfo that shows CPU model as a string
|
||||
cpu="$(awk -F '\\s*: | @' \
|
||||
'/model name|Hardware|Processor|^cpu model|chip type|^cpu type/ {
|
||||
cpu=$2; if ($1 == "Hardware") exit } END { print cpu }' "$cpu_file")"
|
||||
else
|
||||
cpu="$(lscpu | awk -F': ' '/Vendor ID/ {print $2; exit}' ) $(lscpu | awk -F': ' '/Model name/ {print $2; exit}')"
|
||||
fi
|
||||
;;
|
||||
|
||||
|
||||
"riscv"*)
|
||||
cpu="$(awk -F': ' '/uarch/ {print $2; exit}' "$cpu_file")"
|
||||
;;
|
||||
|
||||
|
||||
"loongarch"*)
|
||||
cpu="$(awk -F': ' '/Model/ {print $2; exit}' "$cpu_file")"
|
||||
;;
|
||||
|
||||
*)
|
||||
cpu="$(awk -F '\\s*: | @' \
|
||||
'/model name|Hardware|Processor|^cpu model|chip type|^cpu type/ {
|
||||
|
|
Loading…
Reference in a new issue