Merge pull request #304 from vendion/master

Adding PacBSD support to neofetch
This commit is contained in:
Dylan Araps
2016-08-11 22:04:01 +10:00
committed by GitHub
2 changed files with 40 additions and 5 deletions

View File

@@ -498,6 +498,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")
@@ -701,12 +704,18 @@ getpackages () {
;;
"BSD")
if type -p pkg_info >/dev/null 2>&1; then
packages="$(pkg_info | wc -l)"
case "$distro" in
# PacBSD has both pacman and pkg, but only pacman is used
"PacBSD"*) packages="$(pacman -Qq --color never | wc -l)" ;;
elif type -p pkg >/dev/null 2>&1; then
packages="$(pkg info | wc -l)"
fi
*)
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
;;
esac
;;
"Windows")