summary refs log tree commit diff
path: root/xrevshlib
blob: e9292f9f240aad8e5cfcf349be2289a1d7b5608c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
# xrevshlib PACKAGE - list packages shlib-dependent on PACKAGE or its subpkgs

pkg="${1?no package name given}"

xsubpkg "$pkg" |
	xargs -d'\n' -n1 -r xbps-query -R -p shlib-provides -S |
	sed 's/\.so.*/.so/' |
	xargs -d'\n' -n1 -r xbps-query -R -p shlib-requires -s |
	sed 's/-[^- ]*: .*//' |
	sort -u |
	xargs -d'\n' -n1 -r xsubpkg -m |
	sort -u |
	grep -Fvx "$(xsubpkg -m $pkg)"