index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Luke Shumaker <lukeshu@parabola.nu> | 2017-02-15 14:42:06 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2017-05-12 19:42:31 -0400 |
commit | c7cc926667f42d30f25110f8a0f2d0529c1007b5 (patch) | |
tree | 2315e2b0dd5347673e8d3a00ee625e1a61ee1414 /finddeps.in | |
parent | 68cba262451d0d2f2bbfcb868b00fb80588cead7 (diff) |
-rw-r--r-- | finddeps.in | 18 |
diff --git a/finddeps.in b/finddeps.in index 2a085e5..5f89b55 100644 --- a/finddeps.in +++ b/finddeps.in @@ -4,18 +4,24 @@ # # License: Unspecified -m4_include(lib/common.sh) +. "$(librelib messages)" match=$1 +usage() { + print 'Usage: %s <depname>' "${0##*/}" + print 'Find packages that depend on a given depname.' + echo + prose 'Run this script from the top-level directory of your ABS tree.' +} 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 '' + usage >&2 exit 1 fi +if [[ $match = '-h' ]]; then + usage + exit 0 +fi find . -type d | while read -r d; do if [[ -f "$d/PKGBUILD" ]]; then |