From ada82c54e5948ae6353d7024151dcc429665a070 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 21 Mar 2014 00:36:23 -0400 Subject: Add usage text to the commands in src/devtools --- src/devtools/checkpkg.patch | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/devtools/checkpkg.patch (limited to 'src/devtools/checkpkg.patch') diff --git a/src/devtools/checkpkg.patch b/src/devtools/checkpkg.patch new file mode 100644 index 0000000..fe9568e --- /dev/null +++ b/src/devtools/checkpkg.patch @@ -0,0 +1,43 @@ +--- checkpkg.in 2014-03-20 15:55:50.091249246 -0400 ++++ checkpkg 2014-03-21 00:27:07.318339210 -0400 +@@ -2,7 +2,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 +@@ -17,7 +38,9 @@ + 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 -- cgit v1.2.3-54-g00ecf