diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2020-03-09 23:07:42 +0200 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2020-03-09 23:07:42 +0200 |
| commit | e2068c61d5f0d3408745bc322847413dac736fd0 (patch) | |
| tree | af4cd98af852c6655c7b467fed1936fd08bc67e3 | |
| parent | 39f767e45bc8e81609a67157bdb46c5819be345f (diff) | |
| download | pfetch-e2068c61d5f0d3408745bc322847413dac736fd0.tar.gz | |
IRIX: Packages support
| -rwxr-xr-x | pfetch | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -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". |
