forked from leahneukirchen/xtools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxrs
More file actions
executable file
·24 lines (22 loc) · 758 Bytes
/
xrs
File metadata and controls
executable file
·24 lines (22 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
# xrs PATTERN - like xbps-query -Rs, but take cwd repo into account
BRANCH=$(git symbolic-ref -q --short HEAD 2>/dev/null)
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_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 "$@"