about summary refs log tree commit diff
path: root/xrs
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-09-23 15:15:58 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2015-09-23 15:15:58 +0200
commit851321b76336ac9ab85b30c447b6ea7c622991a2 (patch)
treef400b7ea6ee6849b1a50ba2bfe7f1adda6c8d708 /xrs
parent4fc6fbf76f1b9ed06c281b314925f694f7ece72a (diff)
downloadxtools-851321b76336ac9ab85b30c447b6ea7c622991a2.tar.gz
xtools-851321b76336ac9ab85b30c447b6ea7c622991a2.tar.xz
xtools-851321b76336ac9ab85b30c447b6ea7c622991a2.zip
add xrs
Diffstat (limited to 'xrs')
-rwxr-xr-xxrs12
1 files changed, 12 insertions, 0 deletions
diff --git a/xrs b/xrs
new file mode 100755
index 0000000..b82915c
--- /dev/null
+++ b/xrs
@@ -0,0 +1,12 @@
+#!/bin/sh
+# xrs PATTERN - like xbps-query -Rs, but take cwd repo into account
+
+BRANCH=$(git symbolic-ref -q --short HEAD 2>/dev/null)
+ADDREPO="--repository=hostdir/binpkgs/$BRANCH
+	--repository=../hostdir/binpkgs/$BRANCH
+	--repository=../../hostdir/binpkgs/$BRANCH
+	--repository=hostdir/binpkgs
+	--repository=../hostdir/binpkgs
+	--repository=../../hostdir/binpkgs"
+
+xbps-query $ADDREPO -Rs "$@"