summary refs log tree commit diff
path: root/xmindep
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2014-09-15 00:20:06 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2014-09-15 00:20:06 +0200
commitc457ffe6df1f8defaef4a8514d7fdab3f7ebfe92 (patch)
treeb72a00824c4d9762ef9e253e9b015e115f2d9171 /xmindep
parente89eaeb6efdd8280410be29a292543dd7d8ffdfc (diff)
downloadxtools-c457ffe6df1f8defaef4a8514d7fdab3f7ebfe92.tar.gz
xtools-c457ffe6df1f8defaef4a8514d7fdab3f7ebfe92.tar.xz
xtools-c457ffe6df1f8defaef4a8514d7fdab3f7ebfe92.zip
xmindep: rename from mindep, simply a lot using xbps 0.38
Diffstat (limited to 'xmindep')
-rwxr-xr-xxmindep10
1 files changed, 10 insertions, 0 deletions
diff --git a/xmindep b/xmindep
new file mode 100755
index 0000000..cada61e
--- /dev/null
+++ b/xmindep
@@ -0,0 +1,10 @@
+#!/bin/sh
+# xmindep PKGS... - minimize list of PKGS by removing implicit dependencies
+
+rdeps() {
+	for pkg; do
+		xbps-query --fulldeptree -Rx $pkg
+	done | xargs -d'\n' -rn1 xbps-uhelper getpkgname | sort -u
+}
+
+printf '%s\n' "$@" | grep -Fvx -e "$(rdeps "$@")" | fmt