summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-12-16 00:33:27 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-12-16 00:33:27 -0500
commit3990c562952d8f71da933b1a38ddd7c93f05d36d (patch)
tree2ce2d65c7cac9e27711be8848b52a9ba23c79056
parentc7cd4daad34e1ceb3127dc379fc52fee4becd336 (diff)
packages.sh lukeshu
-rwxr-xr-xpackages.sh7
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'