KittyKatt / screenFetch

Fetches system/theme information in terminal for Linux desktop screenshots.
GNU General Public License v3.0
3.85k stars 454 forks source link

macOS fix #602

Closed zeilen closed 5 years ago

zeilen commented 5 years ago

macOS’s BSD readlink is different from GNU readlink, says: illegal option -- f

zeilen commented 5 years ago

see also: https://github.com/KittyKatt/screenFetch/issues/573

darealshinji commented 5 years ago

Maybe it's better to add a check before the elif readlink -f part. Something like this:

elif readlink --version | head -1 | grep -q GNU && readlink -f "$SHELL" 2>&1 | grep -q -i 'busybox'; then

Does this work on Mac and suppress the readlink warning?

zeilen commented 5 years ago

Keep it simple. It’s simply not needed with my commit because the first if (line 1797) would become true in macOS too and so it would not run the elif and else code. Line 1799 runs fine.