Newer
Older
#
# finddeps - find packages that depend on a given depname
#
match=$1
if [[ -z $match ]]; then
echo 'Usage: finddeps <depname>'
echo ''
echo 'Find packages that depend on a given depname.'
echo 'Run this script from the top-level directory of your ABS tree.'
echo ''
find . -type d | while read -r d; do
pkgname=() depends=() makedepends=() optdepends=()
# shellcheck source=PKGBUILD.proto
[[ $depname = "$match" ]] && echo "$d (depends)"
[[ $depname = "$match" ]] && echo "$d (makedepends)"
for dep in "${optdepends[@]/:*}"; do
# lose the version comaparator, if any
depname=${dep%%[<>=]*}
[[ $depname = "$match" ]] && echo "$d (optdepends)"