Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@parabola.nu>2017-02-15 14:42:06 -0500
committerLuke Shumaker <lukeshu@parabola.nu>2017-02-15 14:42:06 -0500
commite5d65f09ed2421c5e68e3a6fa91bb51773734e26 (patch)
tree7a656edc063b5942d4c502497cdbbd5b36a58cd3
parent10820f2701f1fe43ea32d72c88b6a70dace09b76 (diff)
checkpkg, find-libdeps, finddeps, lddd: Use libremessages to add help text.
-rw-r--r--checkpkg.in27
-rw-r--r--find-libdeps.in28
-rw-r--r--finddeps.in18
-rw-r--r--lddd.in18
4 files changed, 78 insertions, 13 deletions
diff --git a/checkpkg.in b/checkpkg.in
index fbd30d3..6904e32 100644
--- a/checkpkg.in
+++ b/checkpkg.in
@@ -3,7 +3,28 @@
shopt -s extglob
-m4_include(lib/common.sh)
+. "$(librelib messages)"
+
+usage() {
+ print 'Usage: %s [-h]' "${0##*/}"
+ print 'Compare a locally built a package with the one in the repositories.'
+ echo
+ prose 'This should be run from a directory containing a
+ PKGBUILD. It searches for a locally built package
+ corresponding to the PKGBUILD, and downloads the last
+ version of that package from the pacman repositories.
+ It then compares the list of .so files provided by each
+ version of the package. It does this for each part of
+ a split package.'
+}
+
+if [[ $1 = '-h' ]]; then
+ usage
+ exit 0
+elif [[ $# -gt 0 ]]; then
+ usage >&2
+ exit 1
+fi
# Source makepkg.conf; fail if it is not found
if [[ -r '/etc/makepkg.conf' ]]; then
@@ -18,7 +39,9 @@ if [[ -r ~/.makepkg.conf ]]; then
fi
if [[ ! -f PKGBUILD ]]; then
- die 'This must be run in the directory of a built package.'
+ error 'This must be run in the directory of a built package.'
+ usage >&2
+ exit 1
fi
. ./PKGBUILD
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] <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
diff --git a/finddeps.in b/finddeps.in
index 89ccc41..cc1ffab 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 d; do
if [[ -f "$d/PKGBUILD" ]]; then
diff --git a/lddd.in b/lddd.in
index f01ebf9..09e0d07 100644
--- a/lddd.in
+++ b/lddd.in
@@ -4,7 +4,23 @@
#
# License: Unspecified
-m4_include(lib/common.sh)
+. "$(librelib messages)"
+
+usage() {
+ print "Usage: %s [-h]" "${0##*/}"
+ print "Find broken library links on your machine."
+ echo
+ prose 'Scans $PATH and library directories for ELF files with
+ references to missing shared libraries.'
+}
+
+if [[ $1 = '-h' ]]; then
+ usage
+ exit 0
+elif [[ $# -gt 0 ]]; then
+ usage >&2
+ exit 1
+fi
ifs=$IFS
IFS="${IFS}:"