From: Jameson Rollins Date: Fri, 15 Jan 2010 23:34:01 +0000 (-0500) Subject: add trap to remove temp dir in list_primary_fingerprints function X-Git-Tag: monkeysphere_0.28~44 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=1e207b9914d4b19450c94a3de4dbf41305638035;p=monkeysphere.git add trap to remove temp dir in list_primary_fingerprints function --- diff --git a/src/share/common b/src/share/common index 7bacd4e..914fffa 100644 --- a/src/share/common +++ b/src/share/common @@ -1177,9 +1177,11 @@ process_authorized_user_ids() { # fingerprints, one per line: list_primary_fingerprints() { local fake=$(msmktempdir) + trap "rm -rf $fake" EXIT GNUPGHOME="$fake" gpg --no-tty --quiet --import GNUPGHOME="$fake" gpg --with-colons --fingerprint --list-keys | \ awk -F: '/^fpr:/{ print $10 }' + trap - EXIT rm -rf "$fake" }