diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-12-16 08:15:06 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-12-16 08:15:06 +1300 |
commit | b9ed111d6f2173d3e80fd603f7d5d9bf9aa78433 (patch) | |
tree | 3d18d41448dfd08ff5dc11877287dc3a97d0b63b | |
parent | First version (diff) | |
download | parcimini-b9ed111d6f2173d3e80fd603f7d5d9bf9aa78433.tar.gz parcimini-b9ed111d6f2173d3e80fd603f7d5d9bf9aa78433.zip |
Remove numeric suffix for GnuPG binary
-rw-r--r-- | parcimini.bash | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/parcimini.bash b/parcimini.bash index 11c7207..b3a2dc4 100644 --- a/parcimini.bash +++ b/parcimini.bash @@ -3,8 +3,8 @@ self=parcimini # Base interval between key retrievals from first arg; default 20 mins interval=${1:-1200} -# Check we have gpg2 and shuf, neither of which are POSIX -hash gpg2 || exit +# Check we have gpg and shuf, neither of which are POSIX +hash gpg || exit hash shuf || exit # Make a temporary file for the key listings, delete on exit @@ -13,7 +13,7 @@ list=$(mktemp) || exit # Define a function to retrieve all keychain fingerprints key_ids() { - gpg2 --batch --no-tty --list-keys --with-colons | + gpg --batch --no-tty --list-keys --with-colons | awk 'BEGIN { FS = ":" } $1 == "pub" { pub = 1 ; next } $1 == "fpr" && pub { pub = 0 ; key_ids[$(NF-1)]++ } @@ -42,7 +42,7 @@ while key_ids > "$list" ; do # Retrieve key printf >&2 '%s: Retrieving key %s...\n' \ "$self" "$key_id" - gpg2 --batch --no-tty --recv-key "$key_id" + gpg --batch --no-tty --recv-key "$key_id" done done |