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
Notes: sideshowbarker 2024-07-19 04:56:01 +09:00

View file

@ -110,11 +110,11 @@
;;
+
+ "SerenityOS")
+ while IFS=":" read -r a b; do
+ case $a in
+ "brandstr") cpu="${b//\"}" ;;
+ esac
+ done < /proc/cpuinfo
+ # while IFS=":" read -r a b; do
+ # case $a in
+ # "brandstr") cpu="${b//\"}" ;;
+ # esac
+ # done < /proc/cpuinfo
+ # `cpu` will contain "@ [speed]GHz" and to be super correct we
+ # 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.