Adding PacBSD support to neofetch

Signed-off-by: Adam Jimerson <vendion@gmail.com>
This commit is contained in:
Adam Jimerson 2016-08-05 16:01:48 -04:00
parent b7d3130adf
commit 01ce345c33

View file

@ -497,6 +497,9 @@ getdistro () {
# Workaround for PCBSD as uname still displays FreeBSD.
[ -f "/etc/pcbsd-lang" ] && distro="PCBSD"
# Workaround for PacBSD as uname displays FreeBSD.
[ -f "/etc/pacbsd-release" ] && distro="PacBSD"
;;
"Windows")
@ -692,12 +695,16 @@ getpackages () {
;;
"BSD")
# PacBSD has both pacman and pkg, but only pacman is used
if [[ "$distro" == "PacBSD"* ]]; then
packages="$(pacman -Qq --color never | wc -l)"
else
if type -p pkg_info >/dev/null 2>&1; then
packages="$(pkg_info | wc -l)"
elif type -p pkg >/dev/null 2>&1; then
packages="$(pkg info | wc -l)"
fi
fi
;;
"Windows")