woodruffw / screenfetch-c

A rewrite of screenFetch in C.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

detect_distro problems (and a bunch of Arch Linux problems)

KittyKatt opened this issue · comments

First of all, I'd like to say I REALLY like what you're doing with my project. I've actually been attempting to learn C to do something like this myself, but will instead just contribute to yours where you will allow me to. :)

2013-10-20-010724_484x279_scrot

So, detect_distro. Relying on the top line of /etc/lsb-release to be DISTRO_ID is a little unreliable (example: on Arch Linux, the top line is LSB_VERSION=1.4 so the distro detected is "=1.4"). Another issue is the way you're reading that line. I assume that the "=" is not supposed to be there.

If I remove the line, I've also added a detection in my local version for the file /etc/arch-release which will detect Arch Linux if nothing is still found. Please note that I had to comment out an "else {" and "}" to make the following appear.

2013-10-20-010832_484x279_scrot

Note that there are some spacing issues to be dealt with here. I'll try to fix them myself and make a pull request with all of this after cleaning up my edits.

Also, worth noting now that I've browsed screenfetch-c.h, it outputs oldarch_logo instead of arch_logo when "Arch Linux" is detected. Odd.

Thanks for bringing these to my attention!

I merged your changes, and I'll move the /etc/*-version conditions ahead of the /etc/lsb-release check.
Don't solve the unreliability of lsb-release, but at least it will stop problems on Arch (and maybe other) systems.

Also, I think I know why it's printing out the oldarch_logo. Stupid typo on my behalf.

Thanks again.

I'll continue fiddling. Thanks for making this a cool projec.t :)

No problem.
Thanks for contributing.