about summary refs log tree commit diff
path: root/xls
diff options
context:
space:
mode:
Diffstat (limited to 'xls')
-rwxr-xr-xxls27
1 files changed, 16 insertions, 11 deletions
diff --git a/xls b/xls
index 5d5052b..3fdd090 100755
--- a/xls
+++ b/xls
@@ -2,18 +2,23 @@
 # xls PKGS... - list files contained in PKGS (including binpkgs)
 
 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
 "
 
 for pkg; do