Skip to content

Commit

Permalink
feat(waybar-updates): add support for IgnorePkg
Browse files Browse the repository at this point in the history
  • Loading branch information
savely-krasovsky committed Nov 19, 2023
1 parent 4509d90 commit 4e2ab47
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions waybar-updates
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,21 @@ while :; do
done

function check_pacman_updates() {
ignored_packages=$(pacman-conf IgnorePkg)

if [ "$1" == "online" ]; then
pacman_updates=$(checkupdates)
pacman_updates=$(checkupdates | grep -vF "$ignored_packages")
elif [ "$1" == "offline" ]; then
pacman_updates=$(checkupdates --nosync)
pacman_updates=$(checkupdates --nosync | grep -vF "$ignored_packages")
fi

pacman_updates_checksum=$(echo "$pacman_updates" | sha256sum)
pacman_updates_count=$(echo "$pacman_updates" | grep -vc ^$)
}

function check_aur_updates() {
old_aur_packages=$(pacman -Qm)
ignored_packages=$(pacman-conf IgnorePkg)
old_aur_packages=$(pacman -Qm | grep -vF "$ignored_packages")

if [ "$1" == "online" ]; then
rm -f "$tmp_aur_packages_file"
Expand Down

0 comments on commit 4e2ab47

Please sign in to comment.