1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:37:44 +00:00

Ports: Disable /proc/cpuinfo parsing in neofetch, for now

We don't really have a good way of parsing and processing JSON in the
shell yet, and the solution used for /proc/memstat (read) is very
limited and doesn't work for the more complex /proc/cpuinfo array. Let's
disable cpu detection in neofetch for now until we can come up with a
good solution.
This commit is contained in:
Linus Groh 2020-07-11 21:35:26 +01:00 committed by Andreas Kling
parent 858f6dc1d1
commit 8716d1fe99

View file

@ -110,11 +110,11 @@
;; ;;
+ +
+ "SerenityOS") + "SerenityOS")
+ while IFS=":" read -r a b; do + # while IFS=":" read -r a b; do
+ case $a in + # case $a in
+ "brandstr") cpu="${b//\"}" ;; + # "brandstr") cpu="${b//\"}" ;;
+ esac + # esac
+ done < /proc/cpuinfo + # done < /proc/cpuinfo
+ # `cpu` will contain "@ [speed]GHz" and to be super correct we + # `cpu` will contain "@ [speed]GHz" and to be super correct we
+ # have to cut that off and store it in `speed` only for neofetch + # have to cut that off and store it in `speed` only for neofetch
+ # to append it again later - but that's fine for now this way. + # to append it again later - but that's fine for now this way.