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