diff options
author | classabbyamp <void@placeviolette.net> | 2023-04-09 21:56:18 -0400 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2023-04-11 14:07:24 +0200 |
commit | eca62f8ed2480a1d678932c85701c0f62801ae58 (patch) | |
tree | f6129c8efd808501e3a472194b1023feec50016a | |
parent | bdeef0fb043bb108f88b0b66a0ccb5810af1880c (diff) | |
download | xtools-eca62f8ed2480a1d678932c85701c0f62801ae58.tar.gz xtools-eca62f8ed2480a1d678932c85701c0f62801ae58.tar.xz xtools-eca62f8ed2480a1d678932c85701c0f62801ae58.zip |
xmypkgs: use git -C $XDISTDIR
xmypkgs would get the wrong email for me if run from outside void-packages
-rwxr-xr-x | xmypkgs | 6 |
1 files changed, 3 insertions, 3 deletions
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 |