Browse Source

gfsec-split-gpg: Recognize GnuPG > 2.1

Make sure the script will properly recognize the gpg binary for
GnuPG > 2.1.
master
Damien Goutte-Gattat 4 years ago
parent
commit
79510134b4
  1. 5
      NEWS
  2. 2
      configure.ac
  3. 2
      man/gfsec-split-gpg.1.in
  4. 4
      src/gfsec-split-gpg.in

5
NEWS

@ -1,3 +1,8 @@
Changes in gfsecret 0.4.4 (2017-08-27)
* Make sure gfsec-split-gpg recognizes GnuPG > 2.1.
Changes in gfsecret 0.4.3 (2017-07-25)
--------------------------------------

2
configure.ac

@ -1,6 +1,6 @@
dnl Configure template for the gfsecret package
AC_INIT([gfsecret], [0.4.3], [devel@incenp.org])
AC_INIT([gfsecret], [0.4.4], [devel@incenp.org])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([config])

2
man/gfsec-split-gpg.1.in

@ -72,7 +72,7 @@ re-assemble the splitted file. Default is 2.
.SH NOTES
.PP
This script will only work with GnuPG 2.1.
This script will only work with GnuPG 2.1 or higher.
It will abort before attempting anything if it cannot
detect a binary for the correct GnuPG version.

4
src/gfsec-split-gpg.in

@ -30,7 +30,7 @@ find_gpg2()
{
for pgm in gpg2 gpg ; do
type -p $pgm > /dev/null || continue
if $pgm --version 2> /dev/null | grep --quiet '^gpg (GnuPG) 2.1' ; then
if $pgm --version 2> /dev/null | grep --quiet '^gpg (GnuPG) 2.[1-9]' ; then
echo $pgm
fi
done
@ -125,7 +125,7 @@ while true ; do
done
gpg=$(find_gpg2)
[ -n "$gpg" ] || die "GnuPG 2.1 not found"
[ -n "$gpg" ] || die "GnuPG (>=2.1) not found"
keyinfo=$($gpg --with-colons --list-secret-keys $uid | grep -A3 ^sec)
keycnt=$(echo "$keyinfo" | grep -c ^sec)

Loading…
Cancel
Save