summaryrefslogtreecommitdiff
path: root/localgpgcleankeyring
diff options
context:
space:
mode:
Diffstat (limited to 'localgpgcleankeyring')
-rwxr-xr-xlocalgpgcleankeyring18
1 files changed, 7 insertions, 11 deletions
diff --git a/localgpgcleankeyring b/localgpgcleankeyring
index 06591c1..7bb5c84 100755
--- a/localgpgcleankeyring
+++ b/localgpgcleankeyring
@@ -7,12 +7,10 @@ set -e
# my keys are those with a corresponding secret key
mykeys=$(gpg --list-secret-keys --with-colons | grep '^sec' | cut -d: -f5)
-if
- [ -z "$mykeys" ]
-then
- # exit if no key string
- echo "Can't get user's key ID"
- exit 1
+if [ -z "$mykeys" ]; then
+ # exit if no key string
+ echo "Can't get user's key ID"
+ exit 1
fi
# all of the people who have signed my key
@@ -27,10 +25,8 @@ keepers_egrep=$(echo $keepers | sed 's/^/^(/; s/$/)/; s/ /|/g;')
# everyone who isn't on the keepers list is deleted
deleters=$(gpg --list-keys --with-colons | grep '^pub' | cut -d: -f5 | egrep -v ${keepers_egrep})
-if
- [ -z "$deleters" ]
-then
- echo "# Nothing to delete!"
+if [ -z "$deleters" ]; then
+ echo "# Nothing to delete!"
else
- gpg --delete-keys $deleters
+ gpg --delete-keys $deleters
fi