summaryrefslogtreecommitdiff
path: root/src/devtools/finddeps.patch
blob: a960ac1e958d8f41e5867a7d201fb708ba0f99d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--- finddeps.in	2014-03-20 15:55:50.121247884 -0400
+++ finddeps	2014-03-21 00:11:02.573978735 -0400
@@ -3,18 +3,24 @@
 # finddeps - find packages that depend on a given depname
 #
 
-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