The following commit has been merged in the master branch:
commit b8d55114fc1df1a0824ed5d22694a58e48f486a1
Author: James Vega <james...@debian.org>
Date:   Sun Apr 10 21:55:10 2011 -0400

    getbuildlog: Remove temp file if script exits early.
    
    Signed-off-by: James Vega <james...@debian.org>

diff --git a/debian/changelog b/debian/changelog
index da1064c..887fb94 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -37,6 +37,7 @@ devscripts (2.10.72) UNRELEASED; urgency=low
   * getbuildlog:
     + Remove experimental.debian.net, now that experimental logs show up on
       the normal buildd site. (Closes: #621758)
+    + Remove temp file if the script exits early.
 
   [ Ron Lee ]
   * cowpoke: add a --return option that copies the build results back to a
diff --git a/scripts/getbuildlog.sh b/scripts/getbuildlog.sh
index 291a192..6b323f0 100644
--- a/scripts/getbuildlog.sh
+++ b/scripts/getbuildlog.sh
@@ -91,6 +91,8 @@ getbuildlog() {
     BASE=$1
     ALL_LOGS=`mktemp`
 
+    trap "rm -f $ALL_LOGS" EXIT INT QUIT TERM
+
     wget -q -O $ALL_LOGS "$BASE/build.php?&pkg=$PACKAGE"
 
     # Put each href in $ALL_LOGS on a separate line so that $PATTERN

-- 
Git repository for devscripts


-- 
To unsubscribe, send mail to pkg-devscripts-unsubscr...@teams.debian.net.

Reply via email to