pfetch: Initial IRIX support.

This commit is contained in:
Dylan Araps 2020-03-09 12:27:53 +02:00
parent c1cecae824
commit 4cfef9c1e4
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

22
pfetch
View File

@ -218,7 +218,7 @@ get_kernel() {
case $os in case $os in
# Don't print kernel output on some systems as the # Don't print kernel output on some systems as the
# OS name includes it. # OS name includes it.
*BSD*|Haiku|Minix) ;; *BSD*|Haiku|Minix|IRIX*) ;;
*) *)
# '$kernel' is the cached output of 'uname -r'. # '$kernel' is the cached output of 'uname -r'.
@ -336,6 +336,10 @@ get_uptime() {
$(kstat -p unix:0:system_misc:snaptime) $(kstat -p unix:0:system_misc:snaptime)
EOF EOF
;; ;;
IRIX*)
# TODO
;;
esac esac
# Convert the uptime from seconds into days, hours and minutes. # Convert the uptime from seconds into days, hours and minutes.
@ -447,6 +451,11 @@ get_pkgs() {
has pkginfo && pkginfo -i has pkginfo && pkginfo -i
has pkg && pkg list has pkg && pkg list
;; ;;
IRIX*)
# TODO: result - 3.
versions -b
;;
esac | wc -l esac | wc -l
` `
@ -630,6 +639,10 @@ get_memory() {
mem_free=$((pages_free * hw_pagesize / 1024 / 1024)) mem_free=$((pages_free * hw_pagesize / 1024 / 1024))
mem_used=$((mem_full - mem_free)) mem_used=$((mem_full - mem_free))
;; ;;
IRIX*)
# TODO
;;
esac esac
log memory "${mem_used:-?}M / ${mem_full:-?}M" log memory "${mem_used:-?}M / ${mem_full:-?}M"
@ -1035,6 +1048,13 @@ get_ascii() {
EOF EOF
;; ;;
[Ii]rix*)
read_ascii 4 <<-EOF
TODO
EOF
;;
[Ll]inux*[Ll]ite*|[Ll]ite*) [Ll]inux*[Ll]ite*|[Ll]ite*)
read_ascii 3 <<-EOF read_ascii 3 <<-EOF
${c3} /\\ ${c3} /\\