summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2019-04-17 13:10:05 +0200
committerLeah Neukirchen <leah@vuxu.org>2019-04-17 13:12:18 +0200
commitf4a24c2bf9bcffa9a84f82efafebe3639e44f1a0 (patch)
treece0d2ac52b040952b4b61bde48298a3569c9f2e9
parent56bd7bdadf7a59655f0fd8978322e4c7e0abcea1 (diff)
downloadxtools-0.56.tar.gz
xtools-0.56.tar.xz
xtools-0.56.zip
xpkg: add -r rootdir v0.56
-rwxr-xr-xxpkg3
-rw-r--r--xtools.13
2 files changed, 5 insertions, 1 deletions
diff --git a/xpkg b/xpkg
index 13f34df..08002f7 100755
--- a/xpkg
+++ b/xpkg
@@ -7,10 +7,11 @@ filter1='s/^...\? //'
 filter2='s/-[^- ]* .*//'
 mode="--search="
 
-while getopts R:vVmOHDLa flag; do
+while getopts R:r:vVmOHDLa flag; do
 	case "$flag" in
 		D) exec comm -23 <(xpkg | sort) <(xpkg -a | sort);;
 		L) mode="--regex -p repository -s /"; filter0='/:\/\//d';;
+		r) flags="$flags -r $OPTARG";;
 		R) flags="$flags -i --repository=$OPTARG";;
 		m|O|H) mode="-$flag"; filter0=; filter1=; filter2='s/-[^-]*$//';;
 		a) flags="$flags -R"; filter0=;;
diff --git a/xtools.1 b/xtools.1
index a1d5590..f72a1df 100644
--- a/xtools.1
+++ b/xtools.1
@@ -164,12 +164,15 @@ quiet mode, show package names only
 .Pp
 .Nm xpkg
 .Op Fl R Ar repo
+.Op Fl r Ar rootdir
 .Op Fl amOHDvV
 .Nd convenient package lister
 .Bl -tag -offset 2n -width 2n -compact
 .It Fl R Ar repo
 consider only packages from
 .Ar repo
+.It Fl r Ar rootdir
+specifies a full path for the target root directory
 .It Fl a
 list all packages (default: only installed)
 .It Fl m