Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/find-libdeps.in
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@parabola.nu>2017-02-15 14:42:06 -0500
committerLuke Shumaker <lukeshu@parabola.nu>2018-05-20 21:57:40 -0400
commitd8eb7f1a82da95fd3610afb904a615bcd7412daf (patch)
tree5419b3a88f6adb89083387bda19c47b343af0109 /find-libdeps.in
parentd0ca1dfab679910b964619435ef6c88cd7cc84ec (diff)
checkpkg, find-libdeps, finddeps, lddd: Use libremessages to add help text
Diffstat (limited to 'find-libdeps.in')
-rw-r--r--find-libdeps.in28
1 files changed, 24 insertions, 4 deletions
diff --git a/find-libdeps.in b/find-libdeps.in
index 1fb1fdf..cb68237 100644
--- a/find-libdeps.in
+++ b/find-libdeps.in
@@ -1,7 +1,7 @@
#!/bin/bash
# License: Unspecified
-m4_include(lib/common.sh)
+. "$(librelib messages)"
set -e
shopt -s extglob
@@ -20,12 +20,32 @@ case $script_mode in
*) die "Unknown mode %s" "$script_mode" ;;
esac
+usage() {
+ print "Usage: find-lib(deps|provides) [options] <package file|extracted package dir>"
+ print "Find library dependencies or provides of a package."
+ echo
+ prose 'Prints a list of library dependencies in the format:'
+ echo
+ print ' <soname>=<soversion>-<soarch>'
+ echo
+ prose "Where <soversion> is the shared library version, or
+ <soname> repeated if there is no version attached; and
+ <soarch> is the architecture of the library (either \`32\`
+ or \`64\`, based on the ELF Class)."
+ echo
+ print "Options:"
+ flag "--ignore-internal" "Ignore internal libraries; libraries
+ without a version attached"
+ flag "-h" "Show this message"
+}
if [[ -z $1 ]]; then
- echo "${0##*/} [options] <package file|extracted package dir>"
- echo "Options:"
- echo " --ignore-internal ignore internal libraries"
+ usage >&2
exit 1
fi
+if [[ $1 = '-h' ]]; then
+ usage
+ exit 0
+fi
if [[ -d $1 ]]; then
pushd "$1" >/dev/null