summary refs log tree commit diff
path: root/xmindep
diff options
context:
space:
mode:
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