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