aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2020-03-09 23:07:42 +0200
committerDylan Araps <dylan.araps@gmail.com>2020-03-09 23:07:42 +0200
commite2068c61d5f0d3408745bc322847413dac736fd0 (patch)
treeaf4cd98af852c6655c7b467fed1936fd08bc67e3
parent39f767e45bc8e81609a67157bdb46c5819be345f (diff)
downloadpfetch-e2068c61d5f0d3408745bc322847413dac736fd0.tar.gz
IRIX: Packages support
-rwxr-xr-xpfetch15
1 files changed, 10 insertions, 5 deletions
diff --git a/pfetch b/pfetch
index c7dbd09..d32a9b2 100755
--- a/pfetch
+++ b/pfetch
@@ -218,7 +218,7 @@ get_kernel() {
case $os in
# Don't print kernel output on some systems as the
# OS name includes it.
- *BSD*|Haiku|Minix|IRIX*) ;;
+ *BSD*|Haiku|Minix|IRIX) ;;
*)
# '$kernel' is the cached output of 'uname -r'.
@@ -337,7 +337,7 @@ get_uptime() {
EOF
;;
- IRIX*)
+ IRIX)
# Grab the uptime in a pretty format. Usually,
# 00:00:00 from the 'ps' command.
t=$(LC_ALL=POSIX ps -o etime= -p 1)
@@ -467,13 +467,18 @@ get_pkgs() {
has pkg && pkg list
;;
- IRIX*)
- # TODO: result - 3.
+ IRIX)
versions -b
;;
esac | wc -l
`
+ case $os in
+ # IRIX's package manager adds 3 lines of extra
+ # output which we must account for here.
+ IRIX) packages=$((packages - 3)) ;;
+ esac
+
[ "$packages" -gt 1 ] && log pkgs "$packages"
}
@@ -655,7 +660,7 @@ get_memory() {
mem_used=$((mem_full - mem_free))
;;
- IRIX*)
+ IRIX)
# Read the memory information from the 'top' command. Parse
# and split each line until we reach the line starting with
# "Memory".