about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPiraty <piraty1@inbox.ru>2020-11-18 06:04:41 +0100
committerLeah Neukirchen <leah@vuxu.org>2020-11-18 11:18:47 +0100
commitbdcb7b344547079e69aac2e8cd0b315c88a789ea (patch)
treeeb35ac04ed36ec4034ca5a55b3ecde6553bc336c
parentdba0856d247454615ff3b1b4c1f24cbee6e4b3f1 (diff)
downloadxtools-bdcb7b344547079e69aac2e8cd0b315c88a789ea.tar.gz
xtools-bdcb7b344547079e69aac2e8cd0b315c88a789ea.tar.xz
xtools-bdcb7b344547079e69aac2e8cd0b315c88a789ea.zip
xq: take XBPS_HOSTDIR into account
-rwxr-xr-xxq27
1 files changed, 16 insertions, 11 deletions
diff --git a/xq b/xq
index 94609a5..ea4b2cc 100755
--- a/xq
+++ b/xq
@@ -6,18 +6,23 @@ totop() {
 }
 
 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
 "
 
 R=