[polybar] Remove bc dependency for package module

Removed dependency on bc to do simple addition.
This commit is contained in:
Marty Oehme 2020-05-11 12:30:29 +02:00
parent f6517df5a2
commit 9e5abca853
No known key found for this signature in database
GPG key ID: 0CCB0526EFB9611A

View file

@ -5,7 +5,7 @@
# returns empty string when 0 packages are available, so
# that polybar simply displays nothing.
#
# dependendies: yay, bc, (pacman-contrib optional)
# dependendies: yay, (pacman-contrib optional)
# prefer checkupdates since it allows checking w/o partial upgrade
if command -v "checkupdates" >/dev/null; then
@ -21,7 +21,7 @@ updates_aur="$(yay -Qum 2>/dev/null | wc -l)"
# if ! updates_aur=$(pikaur -Qua 2> /dev/null | wc -l); then
# if ! updates_aur=$(rua upgrade --printonly 2> /dev/null | wc -l); then
updates="$(echo "$updates_repo + $updates_aur" | bc)"
updates="$((updates_repo + updates_aur))"
if [ "$updates" -gt 0 ]; then
echo "$updates"