summaryrefslogtreecommitdiffstats
path: root/build_tools/bin
diff options
context:
space:
mode:
authorGreg Frost <gregfrost1@bigpond.com>2009-07-24 22:29:47 (GMT)
committerGreg Frost <gregfrost1@bigpond.com>2009-07-24 22:29:47 (GMT)
commitbb26e435ca9bf517622e66852f65356677bbd1dc (patch)
treeba036842e93c1f933ac68caafbc35f4ff986336d /build_tools/bin
parent0bf3ee9411c21e4707ef3efa6743028a0e14ec20 (diff)
parent576a3f16950384aa6e151bfd8316d6255c331395 (diff)
downloadlinhes_dev-bb26e435ca9bf517622e66852f65356677bbd1dc.zip
Merge branch 'master' of ssh://gregfrost@knoppmyth.net/mount/repository/LinHES-dev
Diffstat (limited to 'build_tools/bin')
-rwxr-xr-xbuild_tools/bin/find_deps.sh38
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: