From bece9da96269b5990d72abbce7c2ce15a85ea572 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 25 Sep 2019 10:29:02 +0300 Subject: [PATCH] packages: bsd support --- pfetch | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pfetch b/pfetch index bf3e003..7657c43 100755 --- a/pfetch +++ b/pfetch @@ -311,20 +311,20 @@ get_pkgs() { ;; FreeBSD*) - # Commands which print packages one per line. - command -v pkg && pkg info + pkg info ;; - *BSD*) - # Commands which print packages one per line. - command -v pkginfo && pkginfo -i - command -v pkg && pkg list - command -v pkg_info && pkg_info + OpenBSD*) + printf '%s\n' /var/db/pkg/*/ + ;; + + NetBSD*) + pkg_info ;; esac | wc -l ` - log pkgs "$packages" >&6 + log pkgs "${packages:-?}" >&6 } get_memory() {