about summary refs log tree commit diff
path: root/xmypkgs
diff options
context:
space:
mode:
Diffstat (limited to 'xmypkgs')
-rwxr-xr-xxmypkgs6
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