summaryrefslogtreecommitdiff
path: root/src/devtools/checkpkg.patch
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-03-21 00:36:23 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-03-21 00:36:23 -0400
commitada82c54e5948ae6353d7024151dcc429665a070 (patch)
treeb0bcbf4a1f56b781824d14457b6b7837d9eed367 /src/devtools/checkpkg.patch
parentd17d1d82349f7f4cb60574f7d9c2f786eec3cc93 (diff)
Add usage text to the commands in src/devtools
Diffstat (limited to 'src/devtools/checkpkg.patch')
-rw-r--r--src/devtools/checkpkg.patch43
1 files changed, 43 insertions, 0 deletions
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