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