KittyKatt/screenFetch — pull request #62 by terrywang (2013-08-02 05:21:10+00:00)
Title: Fix for Arch Linux ARM on Raspberry Pi

A quick and ugly fix for screenfetch running on Arch Linux ARM @ Raspberry Pi.

ScreenFetch from master branch

```
terry@pi:~$ ./screenfetch
pcilib: Cannot open /proc/bus/pci
lspci: Cannot find any working access method.
terry@pi
OS: Archarm
Kernel: armv6l Linux 3.10.4-1-ARCH+
##### Uptime: 3h 11m
####### Packages: Unknown
##O#O## Shell: 606
####### Disk: 587M / 4.6G (13%)
########### CPU: ARMv6-compatible processor rev 7 (v6l) @ 700MHz
############# RAM: 45MB / 460MB
###############
################
#################
#####################
#####################
#################

```

Looking at the code logic, looks like screenfetch is pulling distribution information from `/etc/os-releases`.

On Pi, the contents of the file like below, the key issue is its ID => `archarm`

```
NAME="Arch Linux ARM"
ID=archarm
ID_LIKE=arch
PRETTY_NAME="Arch Linux ARM"
ANSI_COLOR="0;36"
HOME_URL="http://archlinuxarm.org/"
SUPPORT_URL="https://archlinuxarm.org/forum"
BUG_REPORT_URL="https://github.com/archlinuxarm/PKGBUILDs/issues"
```

This commit is a quick and ugly fix, may need a bit more polish when merged;-)

```
terry@pi:~$ ./screenfetch-dev
pcilib: Cannot open /proc/bus/pci
lspci: Cannot find any working access method.
-`
.o+` terry@pi
`ooo/ OS: Arch Linux
`+oooo: Kernel: armv6l Linux 3.10.4-1-ARCH+
`+oooooo: Uptime: 3h 13m
-+oooooo+: Packages: 159
`/:-:++oooo+: Shell: 606
`/++++/+++++++: Disk: 587M / 4.6G (13%)
`/++++++++++++++: CPU: ARMv6-compatible processor rev 7 (v6l) @ 700MHz
`/+++ooooooooooooo/` RAM: 46MB / 460MB
./ooosssso++osssssso+`
.oossssso-````/ossssss+`
-osssssso. :ssssssso.
:osssssss/ osssso+++.
/ossssssss/ +ssssooo/-
`/ossssso+/:- -:/+osssso+-
`+sso+:-` `.-/+oso:
`++:. `-/+/
.` `/
terry@pi:~$
```