about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--README1
-rwxr-xr-xxmypkgs14
2 files changed, 15 insertions, 0 deletions
diff --git a/README b/README
index 845f330..3a7df49 100644
--- a/README
+++ b/README
@@ -20,6 +20,7 @@ https://github.com/voidlinux/xbps
   xls PKGS... - list files contained in PKGS (including binpkgs)
   xmandoc MANPAGE - read manpage of possibly not installed package
   xmindep PKGS... - minimize list of PKGS by removing implicit dependencies
+  xmypkgs [EMAIL] - list all pkgs maintained by you (or EMAIL)
   xnew PKG - create XBPS template template
   xnodev - list not installed -devel packages for installed packages
   xoptdiff [-q] [PKGS...] - show template options which differ from binary package
diff --git a/xmypkgs b/xmypkgs
new file mode 100755
index 0000000..f8b117a
--- /dev/null
+++ b/xmypkgs
@@ -0,0 +1,14 @@
+#!/bin/sh
+# xmypkgs [EMAIL] - list all pkgs maintained by you (or EMAIL)
+
+EMAIL=${1-$(git config user.email)}
+if [ -z "$EMAIL" ]; then
+	echo "who are you? tell your email address." 2>&1
+	exit 1
+fi
+
+cd "$(xdistdir)" &&
+find srcpkgs -name template -print0 |
+	xargs -0 grep -l -F "<$EMAIL>" |
+	cut -d/ -f2 |
+	sort