Giter Site home page Giter Site logo

Comments (8)

nathhad avatar nathhad commented on June 6, 2024 1

Okay, testing on this one as of commit 8ad5a71

Output:

cpu ~ -ash: ./components/cpu_gpu.sh: =~: not found

This one is at least easy to explain as =~ is a bash-only comparison operator, and is what's causing the issue under ash. I was able to fix this quickly on my local copy by editing line 8 to the following:

elif $vendor && [[ "$vendor" = "GenuineIntel" ]] ; then

That provides the following simplified result (but still works fine on my other Debian11/x86 test machine):

That to me I would consider 100% okay on a board like this that provides so little cpu info, it's basically ideal.

from sysfetch.

wick3dr0se avatar wick3dr0se commented on June 6, 2024

Duplicate of issue #23

Thank you for providing information from all of your devices! Can you test my last commit? It should hide now hopefully.. This could be stubborn

from sysfetch.

nathhad avatar nathhad commented on June 6, 2024

Pulling most current version and testing now, results to follow!

from sysfetch.

nathhad avatar nathhad commented on June 6, 2024

Not working at present, output is:

cpu ~ ash: GenuineIntel: unknown operand

I think the issue is in the line

elif $vendor ; [[ $vendor =~ "GenuineIntel" ]] ; then

Something doesn't look quite right there to me - but I haven't quite parsed what yet. But ash is parsing that line in such a way that it's thinking "GenuineIntel" is a command, and throwing quotes around it hasn't helped. Will continue to poke it with a stick and see if I can see what's going on with it.

from sysfetch.

nathhad avatar nathhad commented on June 6, 2024

Potential progress, switching that line to:

elif [[ "$vendor" =~ "GenuineIntel" ]] ; then

Resolves the error text within the output, and gets us back to output that looks like this:

Which looks perfectly serviceable! That may be the fix since we don't have an easily identifiable chip name for this one.

That said, I did also import it to a couple of my slightly older models with older ash compiles, and they do have trouble with the =~ operand:

cpu ~ ash: =~: unknown operand

That should hopefully be a little easier to resolve.

Need to get ready to crash for the night, so I may get slow to respond! I'll probably have to pick back up tomorrow morning.

from sysfetch.

wick3dr0se avatar wick3dr0se commented on June 6, 2024

I pushed a commit that I think will fix it. I did not notice that 'GenuineIntel' was not parsed as a string

from sysfetch.

wick3dr0se avatar wick3dr0se commented on June 6, 2024

Thank you for your testing and solution! I made the changes you requested. I can't verify because I have AMD cpu but it should be good. Closing now as solved!

from sysfetch.

nathhad avatar nathhad commented on June 6, 2024

Testing on commit 579d217 and don't see the change working - I do see line 8 was changed, but the line as changed still causes errors.

Current code: elif $vendor && [[ $($vendor = GenuineIntel) ]] ; then

Error output: components/cpu_gpu.sh: line 8: =: not found

Recommended syntax: elif $vendor && [[ "$vendor" = "GenuineIntel" ]] ; then

Output:
ash/busybox/openwrt: cpu ~ [email protected] (expected and good)
bash/debian11/x86: cpu ~ Intel Core i7 M 640 [email protected] (also still good)

The output on x86 on my machine does include a lot of extra whitespace that for some reason doesn't get reproduced when I copy it in here, but that's a whole separate little quirk that can be prettied up later.

from sysfetch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.