summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--templates/reprepro-export-key.sh.erb1
1 files changed, 1 insertions, 0 deletions
diff --git a/templates/reprepro-export-key.sh.erb b/templates/reprepro-export-key.sh.erb
index 1bce93f..253672a 100644
--- a/templates/reprepro-export-key.sh.erb
+++ b/templates/reprepro-export-key.sh.erb
@@ -7,6 +7,7 @@ KEY="$(gpg --homedir '<%= @basedir %>/.gnupg' --with-colon --list-secret-keys |
if [ -n "$KEY" ]; then
TEMPFILE=$(mktemp)
+ trap "rm -f '$TEMPFILE'" EXIT
DESTFILE='<%= @basedir %>/key.asc'
gpg --homedir '<%= @basedir %>/.gnupg' --export --armor $KEY > "$TEMPFILE"
mv "$TEMPFILE" "$DESTFILE"