From 3990c562952d8f71da933b1a38ddd7c93f05d36d Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 16 Dec 2016 00:33:27 -0500 Subject: packages.sh lukeshu --- packages.sh | 7 ++++--- 1 file 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' -- cgit v1.2.3-54-g00ecf