On Fri, 2016-09-30 at 08:14 -0400, Dave Reisner wrote:
On Fri, Sep 30, 2016 at 01:47:54PM +0200, Gordian Edenhofer wrote:
Signed-off-by: Gordian Edenhofer
--- contrib/paccache.sh.in | 83 ++++++++++++++++++++++++++++++++---- -------------- 1 file changed, 53 insertions(+), 30 deletions(-) diff --git a/contrib/paccache.sh.in b/contrib/paccache.sh.in index 02fae52..78f566f 100644 --- a/contrib/paccache.sh.in +++ b/contrib/paccache.sh.in @@ -30,6 +30,17 @@ declare delim=$'\n' keep=3 movedir= scanarch= QUIET=0 USE_COLOR='y' +# gettext initialization +export TEXTDOMAIN='pacman' +export TEXTDOMAINDIR='@localedir@' + +# Determine whether we have gettext; make it a no-op if we do not +if ! type -p gettext >/dev/null; then + gettext() { + printf "%s\n" "$@" + } +fi + m4_include(../scripts/library/output_format.sh) m4_include(../scripts/library/parseopts.sh) @@ -172,36 +183,48 @@ summarize() { } usage() { - cat <
I'm going to need convincing that this fits the definition of "streamlined" compared to the current implementation.
stream·line /ˈstrēmˌlīn/
1. design or provide with a form that presents very little resistance to a flow of air or water, increasing speed and ease of movement. 2. make (an organization or system) more efficient and effective by employing faster or simpler working methods.
This is neither faster, nor simpler, nor more efficient or effective. It certainly doesn't have lower resistance.
Unifying the syntax of the various contrib scripts will make it easier to amend them because you don't have to honor some random style choice from the initial author. I guess most of you are more familiar with how things are done in makepkg than you are with any script in contrib.