summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2015-08-06 13:56:18 +0200
committerJonas Smedegaard <dr@jones.dk>2015-08-06 13:56:18 +0200
commit2b94962d5940dfeb89a4cde5c85c3c5c2cf664dd (patch)
tree1bcff4a4bcaf11383447d37a0a86600f1e6b48ed
parentdbc3b2a2bb0be2958d3bc6a55b895662399da0b3 (diff)
Use plain sh (not bash), and fail on error.
-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