File annotate-output.patch of Package deb.openSUSE_11.4_Update

Index: devscripts-2.10.62/scripts/annotate-output.sh
===================================================================
--- devscripts-2.10.62.orig/scripts/annotate-output.sh
+++ devscripts-2.10.62/scripts/annotate-output.sh
@@ -63,10 +63,14 @@ if [ $# -lt 1 ]; then
 	exit 1
 fi
 
-OUT=`mktemp /tmp/annotate.XXXXXX` || exit 1
-ERR=`mktemp /tmp/annotate.XXXXXX` || exit 1
+cleanup() { __st=$?; rm -rf "$tmp"; exit $__st; }
+trap cleanup 0
+trap 'exit $?' 1 2 13 15
+
+tmp=$(mktemp -d --tmpdir annotate.XXXXXX) || exit 1
+OUT=$tmp/out
+ERR=$tmp/err
 
-rm -f $OUT $ERR
 mkfifo $OUT $ERR || exit 1
 
 addtime O < $OUT &
openSUSE Build Service is sponsored by