about summary refs log tree commit diff
path: root/xdbg
diff options
context:
space:
mode:
authorÉrico Rolim <erico.erc@gmail.com>2020-06-25 21:21:23 -0300
committerLeah Neukirchen <leah@vuxu.org>2020-06-27 00:08:30 +0200
commite7d9dadda445b40ce50a7f4b6c208fc8060a3a0f (patch)
treedbbb40039fd8e14aea2282e31457e11ea63be4f6 /xdbg
parentdce79138b72a960c4f6b7456b0cd5461815d2397 (diff)
downloadxtools-e7d9dadda445b40ce50a7f4b6c208fc8060a3a0f.tar.gz
xtools-e7d9dadda445b40ce50a7f4b6c208fc8060a3a0f.tar.xz
xtools-e7d9dadda445b40ce50a7f4b6c208fc8060a3a0f.zip
xdbg,xls,xq,xrs: use ADDREPO from xi.
This allows the user, for example, to use `xls` to get the file list of
a nonfree package.

Closes: #185 [via git-merge-pr]
Diffstat (limited to 'xdbg')
-rwxr-xr-xxdbg19
1 files changed, 13 insertions, 6 deletions
diff --git a/xdbg b/xdbg
index 793da33..40079b2 100755
--- a/xdbg
+++ b/xdbg
@@ -2,12 +2,19 @@
 # xdbg PKGS... - list debugging packages for PKGS and recursive dependencies
 
 BRANCH=$(git symbolic-ref -q --short HEAD 2>/dev/null)
-ADDREPO="--repository=hostdir/binpkgs/$BRANCH
-	--repository=../hostdir/binpkgs/$BRANCH
-	--repository=../../hostdir/binpkgs/$BRANCH
-	--repository=hostdir/binpkgs
-	--repository=../hostdir/binpkgs
-	--repository=../../hostdir/binpkgs"
+XBPS_DISTDIR="$(xdistdir)" || XBPS_DISTDIR=.
+ADDREPO="
+	--repository=$XBPS_DISTDIR/hostdir/binpkgs/$BRANCH
+	--repository=$XBPS_DISTDIR/hostdir/binpkgs/$BRANCH/nonfree
+	--repository=$XBPS_DISTDIR/hostdir/binpkgs/$BRANCH/multilib
+	--repository=$XBPS_DISTDIR/hostdir/binpkgs/$BRANCH/multilib/nonfree
+	--repository=$XBPS_DISTDIR/hostdir/binpkgs/$BRANCH/debug
+	--repository=$XBPS_DISTDIR/hostdir/binpkgs
+	--repository=$XBPS_DISTDIR/hostdir/binpkgs/nonfree
+	--repository=$XBPS_DISTDIR/hostdir/binpkgs/multilib
+	--repository=$XBPS_DISTDIR/hostdir/binpkgs/multilib/nonfree
+	--repository=$XBPS_DISTDIR/hostdir/binpkgs/debug
+"
 
 alldbg() {
 	xbps-query --regex $ADDREPO -Rs '-dbg-[^-]*$' |