diff options
author | Piraty <piraty1@inbox.ru> | 2020-11-18 05:57:43 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2020-11-18 11:18:47 +0100 |
commit | 0dd716d6cfb1a32f5fd5dff8ec0047df6a90dca6 (patch) | |
tree | bad32a762b6e311aa02d4d88d28fe70935002111 /xrs | |
parent | bdcb7b344547079e69aac2e8cd0b315c88a789ea (diff) | |
download | xtools-0dd716d6cfb1a32f5fd5dff8ec0047df6a90dca6.tar.gz xtools-0dd716d6cfb1a32f5fd5dff8ec0047df6a90dca6.tar.xz xtools-0dd716d6cfb1a32f5fd5dff8ec0047df6a90dca6.zip |
xrs: take XBPS_HOSTDIR into account v0.62
Diffstat (limited to 'xrs')
-rwxr-xr-x | xrs | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/xrs b/xrs index c628a43..f633492 100755 --- a/xrs +++ b/xrs @@ -2,18 +2,23 @@ # xrs PATTERN - like xbps-query -Rs, but take cwd repo into account 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 " xbps-query $ADDREPO -Rs "$@" |