summaryrefslogtreecommitdiff
path: root/finddeps.in
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@parabola.nu>2017-02-15 14:42:06 -0500
committerLuke Shumaker <lukeshu@parabola.nu>2017-05-05 18:31:17 -0400
commit51b8f2fff11dda8e04a12318624953ab4a22d8e7 (patch)
tree410cbb80d93763612b79d172231b8008d55a0580 /finddeps.in
parentc4d595722ed5c4172bc18190a6c72468a763d9c0 (diff)
downloaddevtools32-51b8f2fff11dda8e04a12318624953ab4a22d8e7.tar.xz
checkpkg, find-libdeps, finddeps, lddd: Use libremessages to add help text.
Diffstat (limited to 'finddeps.in')
-rw-r--r--finddeps.in18
1 files changed, 12 insertions, 6 deletions
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