diff options
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | _xtools | 8 | ||||
-rwxr-xr-x | xsubpkg | 10 |
3 files changed, 16 insertions, 4 deletions
diff --git a/README b/README index 2cf328a..9d36263 100644 --- a/README +++ b/README @@ -36,7 +36,7 @@ https://github.com/voidlinux/xbps xrevbump MESSAGE TEMPLATES... - increase template revision and commit xrs PATTERN - like xbps-query -Rs, but take cwd repo into account xsrc PKG - list source files for XBPS template - xsubpkg PKG - lists all subpackages of a package + xsubpkg [-m] PKG - lists all subpackages of a package Tools working on the void-packages tree use xdistdir to find it, check its output is reasonable first. diff --git a/_xtools b/_xtools index 043a4fe..4c04c58 100644 --- a/_xtools +++ b/_xtools @@ -110,6 +110,12 @@ _xrevbump() { ':available templates:_xtools_all_packages' } +_xsubpkg() { + _arguments : \ + '-m[list master package]'\ + '*:package:_xbps_all_packages' +} + _xtools() { case "$service" in xbulk) _xbulk "$@";; @@ -134,7 +140,7 @@ _xtools() { xrecent) _xrecent "$@";; xrevbump) _xrevbump "$@";; xsrc) _xtool_one_template "$@";; - xsubpkg) _xtool_one_template "$@";; + xsubpkg) _xsubpkg "$@";; esac } diff --git a/xsubpkg b/xsubpkg index 1cb9066..ce236cf 100755 --- a/xsubpkg +++ b/xsubpkg @@ -1,6 +1,12 @@ #!/bin/sh -# xsubpkg PKG - lists all subpackages of a package +# xsubpkg [-m] PKG - lists all subpackages of a package + +followsym="-L" + +case "$1" in + -m) followsym="-P"; shift +esac PKG=$1 cd $(xdistdir) -find -L srcpkgs -maxdepth 2 -samefile srcpkgs/"$PKG"/template | cut -d/ -f 2 +find $followsym srcpkgs -maxdepth 2 -samefile srcpkgs/"$PKG"/template | cut -d/ -f 2 |