diff options
author | Greg Frost <gregfrost1@bigpond.com> | 2009-07-24 22:29:47 (GMT) |
---|---|---|
committer | Greg Frost <gregfrost1@bigpond.com> | 2009-07-24 22:29:47 (GMT) |
commit | bb26e435ca9bf517622e66852f65356677bbd1dc (patch) | |
tree | ba036842e93c1f933ac68caafbc35f4ff986336d /build_tools/bin | |
parent | 0bf3ee9411c21e4707ef3efa6743028a0e14ec20 (diff) | |
parent | 576a3f16950384aa6e151bfd8316d6255c331395 (diff) | |
download | linhes_dev-bb26e435ca9bf517622e66852f65356677bbd1dc.zip |
Merge branch 'master' of ssh://gregfrost@knoppmyth.net/mount/repository/LinHES-dev
Diffstat (limited to 'build_tools/bin')
-rwxr-xr-x | build_tools/bin/find_deps.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/build_tools/bin/find_deps.sh b/build_tools/bin/find_deps.sh new file mode 100755 index 0000000..914088c --- /dev/null +++ b/build_tools/bin/find_deps.sh @@ -0,0 +1,38 @@ +#!/bin/bash +if [ "$1" = "" ]; 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 "" + exit 0 +fi + +match=$1 +tld=$(pwd) + +#for d in $(find . -type d ); do +for d in $(find . -type d ! -path "*/pkg/*" ! -path "*/src/*"); do + cd ${d} + if [ -f PKGBUILD ]; then + unset pkgname depends makedepends + . PKGBUILD + for dep in "${depends[@]}"; do + # lose the version comaparator, if any + depname=${dep%%[<>=]*} + if [ "$depname" = "$match" ]; then + echo "$d (depends)" + fi + done + for dep in "${makedepends[@]}"; do + # lose the version comaparator, if any + depname=${dep%%[<>=]*} + if [ "$depname" = "$match" ]; then + echo "$d (makedepends)" + fi + done + fi + cd $tld +done + +# vim:ft=sh:ts=4:sw=4:et: |