coverage.sh: write mmdebstrap.tdy into temporary file instead of current directory
This commit is contained in:
parent
6455cda34b
commit
8481068cd2
1 changed files with 5 additions and 4 deletions
|
@ -2,15 +2,16 @@
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
perltidy < mmdebstrap > mmdebstrap.tdy
|
TMPFILE=$(mktemp)
|
||||||
|
perltidy < mmdebstrap > "$TMPFILE"
|
||||||
ret=0
|
ret=0
|
||||||
diff -u mmdebstrap mmdebstrap.tdy || ret=$?
|
diff -u mmdebstrap "$TMPFILE" || ret=$?
|
||||||
if [ "$ret" -ne 0 ]; then
|
if [ "$ret" -ne 0 ]; then
|
||||||
echo "perltidy failed" >&2
|
echo "perltidy failed" >&2
|
||||||
rm mmdebstrap.tdy
|
rm "$TMPFILE"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
rm mmdebstrap.tdy
|
rm "$TMPFILE"
|
||||||
|
|
||||||
if [ $(wc -L < mmdebstrap) -gt 79 ]; then
|
if [ $(wc -L < mmdebstrap) -gt 79 ]; then
|
||||||
echo "exceeded maximum line length of 79 characters" >&2
|
echo "exceeded maximum line length of 79 characters" >&2
|
||||||
|
|
Loading…
Reference in a new issue