Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/diffpkg.in
diff options
context:
space:
mode:
authorLevente Polyak <anthraxx@archlinux.org>2022-09-12 01:34:08 +0200
committerLevente Polyak <anthraxx@archlinux.org>2023-05-19 22:27:12 +0200
commita8be7423efb287edd5ef80002a75a853fc0c9c1d (patch)
tree327592b654c18c8b66d0919570f7cdc973c65e04 /src/diffpkg.in
parentd15bd29a9d411dedc0a0682ec54b55e079d4f00f (diff)
pkgctl: add a unified command-line frontend for devtools
This is the first step of a simple and highly structured unified interface to devtools commands in a single wrapper. The split is based on groups like `repo`, `build` and `diff` Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
Diffstat (limited to 'src/diffpkg.in')
-rw-r--r--src/diffpkg.in11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/diffpkg.in b/src/diffpkg.in
index 6d07419..4856e44 100644
--- a/src/diffpkg.in
+++ b/src/diffpkg.in
@@ -5,8 +5,9 @@
m4_include(lib/common.sh)
usage() {
- cat <<- _EOF_
- Usage: ${BASH_SOURCE[0]##*/} [OPTIONS] [MODES] [FILE|PKGNAME...]
+ local -r COMMAND=${_DEVTOOLS_COMMAND:-${BASH_SOURCE[0]##*/}}
+ cat <<- _EOF_
+ Usage: ${COMMAND} [OPTIONS] [MODES] [FILE|PKGNAME...]
Searches for a locally built package corresponding to the PKGBUILD, and
downloads the last version of that package from the Pacman repositories.
@@ -17,8 +18,8 @@ usage() {
When given two packages, diff both packages against each other.
In either case, a package name will be converted to a filename from the
- cache, and diffpkg will proceed as though this filename was initially
- specified.
+ cache, and '${COMMAND}' will proceed as though this filename was
+ initially specified.
OPTIONS
-M, --makepkg-config Set an alternate makepkg configuration file
@@ -300,7 +301,7 @@ shopt -u extglob
if (( $# < 2 )); then
if [[ ! -f PKGBUILD ]]; then
- die "This must be run in the directory of a built package.\nTry '$(basename "$0") --help' for more information."
+ die "This must be run in the directory of a built package.\nTry '${COMMAND} --help' for more information."
fi
# shellcheck source=contrib/makepkg/PKGBUILD.proto