[arch-dev-public] Useful scripts
Jürgen Hötzel
juergen at hoetzel.info
Tue Jul 31 02:41:42 EDT 2007
Hi,
On Tue, Jul 31, 2007 at 12:19:46AM -0400, Travis Willard wrote:
> find-deps:
> This one finds all PKGBUILD files located in any subdirs of $(pwd), and
> finds any and all packages that depend on the command line argument.
> Very useful when searching for packages that might need a rebuild when
> you're updating a lib - just run it in your cvs directory and it'll go
> and find everything that lists your pkg as a dep.
Useful. I did a clean-up/speed-up.
Jürgen
-------------- next part --------------
#!/bin/bash
function grepdep {
while read pkgbuild; do
unset depends makedepends
source $pkgbuild
for depfield in "makedepends[@]" "depends[@]"; do
for depend in ${!depfield}; do
[[ ${depend%%[<>=]*} = "$1" ]] && echo $pkgbuild -- $depfield $depend
done
done
done
}
if [[ "" = "$1" ]]; then
echo "Specify a package!" >&2
exit 1
fi
find . -name PKGBUILD|grepdep $1
More information about the arch-dev-public
mailing list