[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnupload and gpg2
From: |
Bruno Haible |
Subject: |
Re: gnupload and gpg2 |
Date: |
Fri, 18 May 2018 01:26:10 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-119-generic; KDE/5.18.0; x86_64; ; ) |
Paul Eggert wrote:
> Maybe not bother to invoke gpg --version unless gpg_agent_version is 2?
Sure, that's a small speedup. Will do.
> Also, no need for the sed. Something like this perhaps:
>
> case "`(gpg-agent --version) 2>/dev/null`" in
> *'(GnuPG) 2.'*)
> case "`(gpg --version) 2>/dev/null`" in
> *'(GnuPG) 1.'*)
> ...
I wouldn't like to do this, for two reasons:
* The output of "gpg --version" contains other stuff, that may change
without notice. I can't predict which substrings this stuff may contain,
five years from now.
* The HP-UX shell behaves weirdly if the expansion of the 'case' argument
is longer than ca. 100 or 128 characters. Saw this once, years ago, and
since then I always made sure to use only small strings in 'case'.
So, I cannot tell whether the problem is still visible (on HP-UX or
on other deficient systems that may use a similar version of sh).
Bruno