Open and write to the error log only once for all the files analyzed

This commit is contained in:
Pierre Pronchery 2014-08-25 19:43:35 +02:00
parent aa5e64f1b1
commit 4ffe704cba
2 changed files with 4 additions and 6 deletions

View File

@ -70,8 +70,7 @@ target="$1"
[ $clean -ne 0 ] && return 0
ret=0
> "$target"
for i in $($FIND "../doc" "../src" "../tests" "../tools" -name '*.sh'); do
$DEBUG $SHLINT "$i" 2>> "$target" || ret=2
done
$DEBUG $SHLINT "$i" || ret=2
done 2> "$target"
exit $ret

View File

@ -71,8 +71,7 @@ target="$1"
[ $clean -ne 0 ] && return 0
ret=0
> "$target"
for i in $($FIND "../src" "../tools" -name '*.xml' -o -name '*.xsl'); do
$DEBUG $XMLLINT "$i" > "$DEVNULL" 2>> "$target" || ret=2
done
$DEBUG $XMLLINT "$i" > "$DEVNULL" || ret=2
done 2> "$target"
exit $ret