From 4ffe704cba472df80e80f92dbfa1fe79d0149f75 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Mon, 25 Aug 2014 19:43:35 +0200 Subject: [PATCH] Open and write to the error log only once for all the files analyzed --- doc/scripts/shlint.sh | 5 ++--- doc/scripts/xmllint.sh | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/doc/scripts/shlint.sh b/doc/scripts/shlint.sh index 8189588..2d186ee 100755 --- a/doc/scripts/shlint.sh +++ b/doc/scripts/shlint.sh @@ -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 diff --git a/doc/scripts/xmllint.sh b/doc/scripts/xmllint.sh index c5f911d..78469b2 100755 --- a/doc/scripts/xmllint.sh +++ b/doc/scripts/xmllint.sh @@ -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