This commit is contained in:
Dylan 2016-04-12 11:17:21 +10:00
parent 40f9318074
commit 9b5c252cfd
1 changed files with 4 additions and 4 deletions

View File

@ -640,12 +640,12 @@ getuptime () {
getpackages () {
case "$os" in
"Linux")
if type -p dpkg >/dev/null 2>&1; then
packages="$(dpkg --get-selections | grep -cv deinstall$)"
elif type -p pacman >/dev/null 2>&1; then
if type -p pacman >/dev/null 2>&1; then
packages="$(pacman -Qq --color never | wc -l)"
elif type -p dpkg >/dev/null 2>&1; then
packages="$(dpkg --get-selections | grep -cv deinstall$)"
elif type -p /sbin/pkgtool >/dev/null 2>&1; then
packages="$(ls -1 /var/log/packages | wc -l)"