configfiles/scripts/pkginfo.sh

28 lines
356 B
Bash
Raw Normal View History

2015-06-08 18:25:12 +02:00
#!/bin/bash
internet=$(wicd-cli --status | grep Connected)
pac_updates() {
checkupdates | wc -l
}
aur_updates() {
yaourt -Quaq | wc -l
}
useless_packages() {
pacman -Qtdq | wc -l
}
if [ -z "$internet" ]; then
2015-06-08 18:25:12 +02:00
pac=?
aur=?
else
pac=$(pac_updates)
aur=$(aur_updates)
fi
useless=$(useless_packages)
echo "$pac+$aur-$useless"