about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPiraty <piraty1@inbox.ru>2020-11-18 05:56:04 +0100
committerLeah Neukirchen <leah@vuxu.org>2020-11-18 11:18:47 +0100
commit508e739fed08c753ea4d486fa36d46beb21b3827 (patch)
treee77293de6a5d6ac9faf82ce8455e41cc706b3597
parent6f4ba2f96cf7eb7389508d9f0008593e47f44d17 (diff)
downloadxtools-508e739fed08c753ea4d486fa36d46beb21b3827.tar.gz
xtools-508e739fed08c753ea4d486fa36d46beb21b3827.tar.xz
xtools-508e739fed08c753ea4d486fa36d46beb21b3827.zip
xdbg: take XBPS_HOSTDIR into account
-rwxr-xr-xxdbg27
1 files changed, 16 insertions, 11 deletions
diff --git a/xdbg b/xdbg
index 54ad35e..cb85287 100755
--- a/xdbg
+++ b/xdbg
@@ -2,18 +2,23 @@
 # xdbg PKGS... - list debugging packages for PKGS and recursive dependencies
 
 BRANCH=$(git symbolic-ref -q --short HEAD 2>/dev/null)
-XBPS_DISTDIR="$(xdistdir 2>/dev/null)" || XBPS_DISTDIR=.
+if [ -n "$XBPS_HOSTDIR" ]; then
+	XBPS_BINPKGS="$XBPS_HOSTDIR/binpkgs"
+else
+	XBPS_DISTDIR="$(xdistdir 2>/dev/null)" || XBPS_DISTDIR=.
+	XBPS_BINPKGS="$XBPS_DISTDIR/hostdir/binpkgs"
+fi
 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
+	--repository=$XBPS_BINPKGS/$BRANCH
+	--repository=$XBPS_BINPKGS/$BRANCH/nonfree
+	--repository=$XBPS_BINPKGS/$BRANCH/multilib
+	--repository=$XBPS_BINPKGS/$BRANCH/multilib/nonfree
+	--repository=$XBPS_BINPKGS/$BRANCH/debug
+	--repository=$XBPS_BINPKGS
+	--repository=$XBPS_BINPKGS/nonfree
+	--repository=$XBPS_BINPKGS/multilib
+	--repository=$XBPS_BINPKGS/multilib/nonfree
+	--repository=$XBPS_BINPKGS/debug
 "
 
 alldbg() {