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
|
|
|
|
}
|
|
|
|
|
2015-06-10 08:43:17 +02:00
|
|
|
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"
|