diff options
-rwxr-xr-x | packages.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/packages.sh b/packages.sh index 627487b..8296644 100755 --- a/packages.sh +++ b/packages.sh @@ -2,17 +2,18 @@ all=($(< packages.txt sed 's/#.*//' | xargs printf -- '%s\n' | sort -u)) grps=($(printf -- '%s\n' "${all[@]}" | sed -n 's/^g://p')) pkgs=($(printf -- '%s\n' "${all[@]}" | sed -n 's/^p://p')) +igns=($(printf -- '%s\n' "${all[@]}" | sed -n 's/^i://p')) echo ' => In packages.txt, but not installed' comm -13 \ <(pacman -Qq|sort -u) \ - <({ pacman -Qgq -- "${grps[@]}"; printf '%s\n' "${pkgs[@]}"; }|sort -u) | + <({ pacman -Sgq -- "${grps[@]}"; printf '%s\n' "${pkgs[@]}"; }|sort -u) | sed 's|^| -> |' echo ' => Installed explicitly and not depended on, but not in packages.txt' comm -23 \ <(pacman -Qetq |sort -u) \ - <({ pacman -Qgq -- "${grps[@]}"; printf '%s\n' "${pkgs[@]}"; }|sort -u) | + <({ pacman -Sgq -- "${grps[@]}"; printf '%s\n' "${pkgs[@]}"; }|sort -u) | sed 's|^| -> |' echo ' => Installed explicitly and only optionally depended on, but not in packages.txt' @@ -20,7 +21,7 @@ comm -23 \ <(comm -23 \ <(pacman -Qettq|sort -u) \ <(pacman -Qetq |sort -u)) \ - <({ pacman -Qgq -- "${grps[@]}"; printf '%s\n' "${pkgs[@]}"; }|sort -u) | + <({ pacman -Sgq -- "${grps[@]}"; printf '%s\n' "${pkgs[@]}"; }|sort -u) | sed 's|^| -> |' echo ' => Installed as dependencies, but only optionally depended on' |