Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
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>2018-03-26 18:20:56 -0400
commitbae0e4d364084d8370647c5608bebfff25350726 (patch)
treecd4b1d29b4d9382c8ef0cfb130ab1a891c2b4e06 /finddeps.in
parentce1ff66a37a0420015eefaa8270a3877f662f4d3 (diff)
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