Packages: Separate FreeBSD pkg from Linux/Solaris pkg detection
This commit is contained in:
parent
5f48a04bda
commit
2bad735fb3
1 changed files with 6 additions and 3 deletions
9
neofetch
9
neofetch
|
@ -450,9 +450,12 @@ get_packages() {
|
||||||
packages="$((packages+=$(pkg_info | wc -l)))"
|
packages="$((packages+=$(pkg_info | wc -l)))"
|
||||||
|
|
||||||
if type -p pkg >/dev/null; then
|
if type -p pkg >/dev/null; then
|
||||||
packages="$((packages+=$(ls -1 /var/db/pkg | wc -l)))"
|
case "$kernel_name" in
|
||||||
(("$packages" == "0")) && packages="$((packages+=$(pkg info | wc -l)))"
|
"FreeBSD") packages="$((packages+=$(pkg info | wc -l)))" ;;
|
||||||
(("$packages" == "0")) && packages="$((packages+=$(pkg list | wc -l)))"
|
*)
|
||||||
|
packages="$((packages+=$(ls -1 /var/db/pkg | wc -l)))"
|
||||||
|
(("$packages" == "0")) && packages="$((packages+=$(pkg list | wc -l)))"
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue