Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/checkpkg.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-29 15:11:15 -0400
commit3a7f5a80a7caa4a65d91eec0b5b009dc0f17e8a7 (patch)
tree7bcb01c6afe90ffe16d6903d27189ac8bbb26a7f /checkpkg.in
parent9cfe6d64ed9d38c8fb158cd7e792fef7d14d0bea (diff)
checkpkg, find-libdeps, finddeps, lddd: Use libremessages to add help text
Diffstat (limited to 'checkpkg.in')
-rw-r--r--checkpkg.in27
1 files changed, 25 insertions, 2 deletions
diff --git a/checkpkg.in b/checkpkg.in
index e0e1f83..cfec71e 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
@@ -23,7 +44,9 @@ elif [[ -r "$HOME/.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
# shellcheck source=PKGBUILD.proto