From 017aa041d86340f2b4f82c765ba84aaa096136ec Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 19 Jul 2021 18:00:49 +0300 Subject: [PATCH] neofetch: Only try pkg if on a BSD. Closes #1834 --- neofetch | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/neofetch b/neofetch index 71a8043e..ee193cfb 100755 --- a/neofetch +++ b/neofetch @@ -1608,13 +1608,15 @@ get_packages() { # TODO: Fix this somehow. has pkginfo && tot pkginfo -i - case $kernel_name in - FreeBSD|DragonFly) has pkg && tot pkg info ;; + case $os-$kernel_name in + BSD-FreeBSD|BSD-DragonFly) + has pkg && tot pkg info + ;; - *) + BSD-*) has pkg && dir /var/db/pkg/* - ((packages == 0)) && \ + ((packages == 0)) && has pkg && tot pkg list ;; esac