Wildcard linux distros in getpackages

This commit is contained in:
Dylan 2016-01-19 11:42:31 +11:00
parent eb8f115df4
commit b7bb03b6ab

12
fetch
View file

@ -422,27 +422,27 @@ getuptime () {
# Get package count # Get package count
getpackages () { getpackages () {
case "$distro" in case "$distro" in
"Arch Linux" | "Parabola GNU/Linux-libre" | "Manjaro" | "Antergos") "Arch Linux"* | "Parabola GNU/Linux-libre"* | "Manjaro"* | "Antergos"*)
packages="$(pacman -Qq --color never | wc -l)" packages="$(pacman -Qq --color never | wc -l)"
;; ;;
"void") "void"*)
packages="$(xbps-query -l | wc -l)" packages="$(xbps-query -l | wc -l)"
;; ;;
"Ubuntu" | "Mint" | "Debian" | "Kali Linux" | "Deepin Linux") "Ubuntu"* | "Mint"* | "Debian"* | "Kali Linux"* | "Deepin Linux"*)
packages="$(dpkg --get-selections | grep -v deinstall$ | wc -l)" packages="$(dpkg --get-selections | grep -v deinstall$ | wc -l)"
;; ;;
"Slackware") "Slackware"*)
packages="$(ls -1 /var/log/packages | wc -l)" packages="$(ls -1 /var/log/packages | wc -l)"
;; ;;
"Gentoo" | "Funtoo") "Gentoo"* | "Funtoo"*)
packages="$(ls -d /var/db/pkg/*/* | wc -l)" packages="$(ls -d /var/db/pkg/*/* | wc -l)"
;; ;;
"Fedora" | "openSUSE"|"Red Hat Enterprise Linux"|"CentOS") "Fedora"* | "openSUSE"* | "Red Hat Enterprise Linux"* | "CentOS"*)
packages="$(rpm -qa | wc -l)" packages="$(rpm -qa | wc -l)"
;; ;;