summaryrefslogtreecommitdiff
path: root/.local/bin/aurignored
blob: 2eaabd89892547531437069ec86f26fb0e0ae7ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

# Get list of ignored pkgs
function ignored() {
    pkgs="$(grep IgnorePkg /etc/pacman.conf | sed -e 's/IgnorePkg =//' -e 's/#.*//')"
    grps="$(grep IgnoreGroup /etc/pacman.conf | sed -e 's/IgnoreGroup =//' -e 's/#.*//')"
    [[ -n $grps ]] && pkgs="$pkgs $(pacman -Sgq $grps)"

    echo -n "$pkgs" | tail -n -1
}

# Return only AUR pkgs
for pkg in $(ignored)
do
    pacman -Si $pkg &>/dev/null || echo "$pkg"
done