From 070092d2492c6d21f42d2bb8d47bfd5e4a4ecfa5 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 15 Feb 2017 14:03:56 -0500 Subject: Apply patches from libretools. --- find-libdeps.in | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'find-libdeps.in') diff --git a/find-libdeps.in b/find-libdeps.in index 5c350a9..794a2cd 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] " + print "Find library dependencies or provides of a package." + echo + prose 'Prints a list of library dependencies in the format:' + echo + print ' =-' + echo + prose 'Where is the shared library version, or + repeated if there is no version attached; and + 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] " - 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 -- cgit v1.2.3-70-g09d2