Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 02a9bd8

Browse files
committed
pfetch: code style changes
1 parent a9af270 commit 02a9bd8

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

pfetch

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,8 @@ get_pkgs() {
468468
;;
469469
470470
SunOS)
471-
has pkginfo && pkginfo -i
472-
has pkg && pkg list
471+
has pkginfo && pkginfo -i
472+
has pkg && pkg list
473473
;;
474474
esac | wc -l
475475
`
@@ -631,8 +631,11 @@ get_memory() {
631631
SunOS)
632632
hw_pagesize=$(pagesize)
633633

634-
while read -r _ p; do
635-
: "${pages_total:+"${pages_free="$p"}"}" "${pages_total="$p"}"
634+
while read -r key val; do
635+
case $key in
636+
*total) pages_total=$val ;;
637+
*free) pages_free=$val ;;
638+
esac
636639
done <<-EOF
637640
$(kstat -p unix:0:system_pages:pagestotal \
638641
unix:0:system_pages:pagesfree)

0 commit comments

Comments
 (0)