summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-09-05 15:11:18 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-09-05 15:11:18 +0200
commit6d6345829fdc4cded2d0d5f0b56aa41119f3195c (patch)
tree48a11197199c409a137526d8d494ef03aa23471e
parent62cb30c4282ef3b3fcc45d22b7d2d9666867d935 (diff)
downloadxtools-6d6345829fdc4cded2d0d5f0b56aa41119f3195c.tar.gz
xtools-6d6345829fdc4cded2d0d5f0b56aa41119f3195c.tar.xz
xtools-6d6345829fdc4cded2d0d5f0b56aa41119f3195c.zip
xpkg: add -D to list packages not in repo v0.43
-rwxr-xr-xxpkg8
1 files changed, 5 insertions, 3 deletions
diff --git a/xpkg b/xpkg
index 40e6ed1..d534d41 100755
--- a/xpkg
+++ b/xpkg
@@ -1,5 +1,5 @@
-#!/bin/sh
-# xpkg [-RamOHvV] - convenient package lister
+#!/bin/bash
+# xpkg [-RamOHDvV] - convenient package lister
 
 flags=
 filter0='/^.[^i*].\? /d'
@@ -7,8 +7,9 @@ filter1='s/^...\? //'
 filter2='s/-[^- ]* .*//'
 mode="--search="
 
-while getopts R:vVmOHa flag; do
+while getopts R:vVmOHDa flag; do
 	case "$flag" in
+		D) exec comm -23 <(xpkg | sort) <(xpkg -a | sort);;
 		R) flags="$flags -i --repository=$OPTARG";;
 		m|O|H) mode="-$flag"; filter0=; filter1=; filter2='s/-[^-]*$//';;
 		a) flags="$flags -R"; filter0=;;
@@ -20,6 +21,7 @@ while getopts R:vVmOHa flag; do
   -m	   list manual packages
   -O       list orphaned packages
   -H       list packages on hold
+  -D       list installed packages not in repo
   -v       show version numbers
   -V       show version numbers and description
 " $0 1>&2