|
From: | Paul Eggert |
Subject: | Re: gnupload and gpg2 |
Date: | Thu, 17 May 2018 15:44:22 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
The patch's basic idea looks good; thanks. On 05/17/2018 01:46 PM, Bruno Haible wrote:
+gpg_version=`(gpg --version) 2>/dev/null | sed -e '2,$d' -e 's/^[^0-9]*//'` +gpg_agent_version=`(gpg-agent --version) 2>/dev/null | sed -e '2,$d' -e 's/^[^0-9]*//'` +case "$gpg_agent_version" in + 2.*) + case "$gpg_version" in + 1.*)
Maybe not bother to invoke gpg --version unless gpg_agent_version is 2? 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.'*) ...
[Prev in Thread] | Current Thread | [Next in Thread] |