summaryrefslogtreecommitdiff
path: root/localgpgcleankeyring
diff options
context:
space:
mode:
Diffstat (limited to 'localgpgcleankeyring')
-rwxr-xr-xlocalgpgcleankeyring4
1 files changed, 3 insertions, 1 deletions
diff --git a/localgpgcleankeyring b/localgpgcleankeyring
index 9245f9e..de4e078 100755
--- a/localgpgcleankeyring
+++ b/localgpgcleankeyring
@@ -1,8 +1,10 @@
-#!/bin/bash
+#!/bin/sh
# clean_keyring.sh - clean up all the excess keys
# origin: https://scruss.com/blog/2013/05/12/clean-up-your-gnupg-keyring/
+set -e
+
# my keys are those with a corresponding secret key
mykeys=$(gpg --list-secret-keys --with-colons | grep '^sec' | cut -d: -f5)
if