Wildcard linux distros in getpackages
This commit is contained in:
parent
eb8f115df4
commit
b7bb03b6ab
1 changed files with 6 additions and 6 deletions
12
fetch
12
fetch
|
@ -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)"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue