index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Luke Shumaker <lukeshu@parabola.nu> | 2017-02-15 14:42:06 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2017-02-15 14:42:06 -0500 |
commit | e5d65f09ed2421c5e68e3a6fa91bb51773734e26 (patch) | |
tree | 7a656edc063b5942d4c502497cdbbd5b36a58cd3 /checkpkg.in | |
parent | 10820f2701f1fe43ea32d72c88b6a70dace09b76 (diff) |
-rw-r--r-- | checkpkg.in | 27 |
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 |