Wildcard linux distros in getpackages

This commit is contained in:
Dylan 2016-01-19 11:42:31 +11:00
parent eb8f115df4
commit b7bb03b6ab
1 changed files with 6 additions and 6 deletions

12
fetch
View File

@ -422,27 +422,27 @@ getuptime () {
# Get package count
getpackages () {
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)"
;;
"void")
"void"*)
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)"
;;
"Slackware")
"Slackware"*)
packages="$(ls -1 /var/log/packages | wc -l)"
;;
"Gentoo" | "Funtoo")
"Gentoo"* | "Funtoo"*)
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)"
;;