mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-23 20:12:31 +00:00
Switch from if -> case for BSD package counts
Signed-off-by: Adam Jimerson <vendion@gmail.com>
This commit is contained in:
22
neofetch
22
neofetch
@@ -695,16 +695,18 @@ getpackages () {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
"BSD")
|
"BSD")
|
||||||
# PacBSD has both pacman and pkg, but only pacman is used
|
case "$distro" in
|
||||||
if [[ "$distro" == "PacBSD"* ]]; then
|
# PacBSD has both pacman and pkg, but only pacman is used
|
||||||
packages="$(pacman -Qq --color never | wc -l)"
|
"PacBSD"*) packages="$(pacman -Qq --color never | wc -l)" ;;
|
||||||
else
|
|
||||||
if type -p pkg_info >/dev/null 2>&1; then
|
*)
|
||||||
packages="$(pkg_info | wc -l)"
|
if type -p pkg_info >/dev/null 2>&1; then
|
||||||
elif type -p pkg >/dev/null 2>&1; then
|
packages="$(pkg_info | wc -l)"
|
||||||
packages="$(pkg info | wc -l)"
|
elif type -p pkg >/dev/null 2>&1; then
|
||||||
fi
|
packages="$(pkg info | wc -l)"
|
||||||
fi
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Windows")
|
"Windows")
|
||||||
|
|||||||
Reference in New Issue
Block a user