[devscripts] 01/01: who-uploads: Make $GNUPGHOME cleanup more robust
James McCoy
jamessan at debian.org
Mon Feb 16 04:17:56 UTC 2015
This is an automated email from the git hooks/post-receive script.
jamessan pushed a commit to branch master
in repository devscripts.
commit 8bbc579bb15eafaf289e2913a880a609f6cac092
Author: James McCoy <jamessan at debian.org>
Date: Sun Feb 15 23:17:47 2015 -0500
who-uploads: Make $GNUPGHOME cleanup more robust
Signed-off-by: James McCoy <jamessan at debian.org>
---
scripts/who-uploads.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/who-uploads.sh b/scripts/who-uploads.sh
index b213ee5..3dab43f 100755
--- a/scripts/who-uploads.sh
+++ b/scripts/who-uploads.sh
@@ -187,7 +187,7 @@ done
IFS="${OIFS:- }"
GNUPGHOME=$(mktemp -d)
-trap 'rm -r "$GNUPGHOME"' HUP INT QUIT PIPE ALRM TERM
+trap '[ ! -d "$GNUPGHOME" ] || rm -r "$GNUPGHOME"' HUP INT QUIT PIPE ALRM TERM
export GNUPGHOME
# Some useful abbreviations for gpg options
@@ -245,5 +245,5 @@ for package; do
test $# -eq 1 || echo
done
-rm -r "$GNUPGHOME"
+[ ! -d "$GNUPGHOME" ] || rm -r "$GNUPGHOME"
exit 0
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git
More information about the devscripts-devel
mailing list