mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-03 16:51:29 +00:00
neofetch: Only try pkg if on a BSD. Closes #1834
This commit is contained in:
10
neofetch
10
neofetch
@@ -1608,13 +1608,15 @@ get_packages() {
|
|||||||
# TODO: Fix this somehow.
|
# TODO: Fix this somehow.
|
||||||
has pkginfo && tot pkginfo -i
|
has pkginfo && tot pkginfo -i
|
||||||
|
|
||||||
case $kernel_name in
|
case $os-$kernel_name in
|
||||||
FreeBSD|DragonFly) has pkg && tot pkg info ;;
|
BSD-FreeBSD|BSD-DragonFly)
|
||||||
|
has pkg && tot pkg info
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
BSD-*)
|
||||||
has pkg && dir /var/db/pkg/*
|
has pkg && dir /var/db/pkg/*
|
||||||
|
|
||||||
((packages == 0)) && \
|
((packages == 0)) &&
|
||||||
has pkg && tot pkg list
|
has pkg && tot pkg list
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Reference in New Issue
Block a user