index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Luke Shumaker <lukeshu@parabola.nu> | 2017-02-15 14:03:56 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2017-02-15 14:03:56 -0500 |
commit | 070092d2492c6d21f42d2bb8d47bfd5e4a4ecfa5 (patch) | |
tree | 4e0d6d8cba3ade14d39a3acc910c3371aff78afe /finddeps.in | |
parent | aa11acaf52dfd101cb6fe6f7137d2cbd5c8e0d9b (diff) |
-rw-r--r-- | finddeps.in | 18 |
diff --git a/finddeps.in b/finddeps.in index 89ccc41..cc1ffab 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 d; do if [[ -f "$d/PKGBUILD" ]]; then |