From eca62f8ed2480a1d678932c85701c0f62801ae58 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Sun, 9 Apr 2023 21:56:18 -0400 Subject: xmypkgs: use git -C $XDISTDIR xmypkgs would get the wrong email for me if run from outside void-packages --- xmypkgs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xmypkgs') diff --git a/xmypkgs b/xmypkgs index 8e8f498..3ffae18 100755 --- a/xmypkgs +++ b/xmypkgs @@ -1,13 +1,13 @@ #!/bin/sh # xmypkgs [EMAIL] - list all pkgs maintained by you (or EMAIL) -EMAIL=${1-$(git config user.email)} +XDISTDIR="$(xdistdir)" || exit 1 +EMAIL=${1-$(git -C "$XDISTDIR" config user.email)} if [ -z "$EMAIL" ]; then echo "who are you? tell your email address." 2>&1 exit 1 fi -cd "$(xdistdir)" && -git grep -l -F "<$EMAIL>" -- 'srcpkgs/*/template' | +git -C "$XDISTDIR" grep -l -F "<$EMAIL>" -- 'srcpkgs/*/template' | cut -d/ -f2 | sort -- cgit 1.4.1