From 8481068cd26618d35c1bcb12d7eb731f854b3ab2 Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Tue, 21 Jan 2020 13:07:18 +0100 Subject: [PATCH] coverage.sh: write mmdebstrap.tdy into temporary file instead of current directory --- coverage.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/coverage.sh b/coverage.sh index ac9754a..7180caa 100755 --- a/coverage.sh +++ b/coverage.sh @@ -2,15 +2,16 @@ set -eu -perltidy < mmdebstrap > mmdebstrap.tdy +TMPFILE=$(mktemp) +perltidy < mmdebstrap > "$TMPFILE" ret=0 -diff -u mmdebstrap mmdebstrap.tdy || ret=$? +diff -u mmdebstrap "$TMPFILE" || ret=$? if [ "$ret" -ne 0 ]; then echo "perltidy failed" >&2 - rm mmdebstrap.tdy + rm "$TMPFILE" exit 1 fi -rm mmdebstrap.tdy +rm "$TMPFILE" if [ $(wc -L < mmdebstrap) -gt 79 ]; then echo "exceeded maximum line length of 79 characters" >&2