643 lines
14 KiB
Bash
Executable File
643 lines
14 KiB
Bash
Executable File
#!/bin/bash
|
||
# Check translations, generate verbose statistics.
|
||
# Copyright (C) 2004 Recai Oktas <roktas@omu.edu.tr>
|
||
# Copyright (C) 2007-2008 Andrius Štikonas <stikonas@gmail.com> (my code can also be used under GPLv3 or any later)
|
||
# MediaWiki 'glamdrol' style sheet Copyright (C) 2005 by Jordą Polo <jorda AT ettin DOT org> Based on 'monobook', by Gabriel Wicke
|
||
#
|
||
# This program is free software: you can redistribute it and/or modify
|
||
# it under the terms of the GNU General Public License version 2 as published by
|
||
# the Free Software Foundation.
|
||
#
|
||
# This program is distributed in the hope that it will be useful,
|
||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
# GNU General Public License for more details.
|
||
#
|
||
# You should have received a copy of the GNU General Public License
|
||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||
|
||
source variables
|
||
|
||
LC_NUMERIC="en_US.UTF-8"
|
||
ODD_CHARS='<27>'
|
||
CL=0 # counter for css style
|
||
STATUS="OK" # Total status of translations
|
||
|
||
if [ ! $MSGFMT ]; then
|
||
echo -e $RED"This program needs the msgfmt utility."$ENDCOLOR
|
||
exit 1
|
||
fi
|
||
|
||
if [ ! $ISUTF8 ]; then
|
||
echo -e $RED"This program needs the isutf8 utility."$ENDCOLOR
|
||
exit 1
|
||
fi
|
||
|
||
for BRANCH in $TRUNK $BRANCHES; do
|
||
echo -e "Repository: $BLUE$BRANCH"$ENDCOLOR
|
||
DIR="$PREFIX-$BRANCH"
|
||
STATSFILE="statistics-$BRANCH.xhtml"
|
||
ERRORS="translation-errors-$BRANCH"
|
||
nerror=0; nwarn=0; npo=0; nt=0; nu=0; nf=0
|
||
rm -f $STATSFILE
|
||
|
||
echo -e "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"
|
||
\"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">
|
||
<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">
|
||
<head>
|
||
<meta http-equiv=\"content-type\" content=\"application/xhtml+xml; charset=utf-8\" />
|
||
<link rel=\"shortcut icon\" type=\"image/png\" href=\"http://www.wesnoth.org/mw/skins/glamdrol/ico.png\" />
|
||
<title>Battle for Wesnoth</title>
|
||
</head>
|
||
<style type=\"text/css\">
|
||
body {
|
||
margin: 0;
|
||
padding: 0;
|
||
background: #FFFBF0;
|
||
color: #111;
|
||
font: 0.88em sans-serif;
|
||
}
|
||
|
||
#global {
|
||
width: 100%;
|
||
margin: 0;
|
||
padding: 0;
|
||
font-size: 0.95em;
|
||
}
|
||
|
||
p {
|
||
margin: 0.4em 0em 0.5em 0em;
|
||
line-height: 1.6em;
|
||
}
|
||
|
||
img {
|
||
border: none;
|
||
vertical-align: middle;
|
||
}
|
||
|
||
p img {
|
||
margin: 0;
|
||
}
|
||
|
||
hr {
|
||
height: 1px;
|
||
margin: 0.2em 0 0.2em 0;
|
||
background: #BBB;
|
||
color: #BBB;
|
||
border: 0;
|
||
}
|
||
|
||
/* links */
|
||
|
||
a {
|
||
color: #259;
|
||
}
|
||
|
||
/*
|
||
a:visited {
|
||
color: #959;
|
||
color: #755499;
|
||
color: #5F5399;
|
||
}
|
||
*/
|
||
|
||
a.new {
|
||
color: #BA3311;
|
||
}
|
||
|
||
a.stub {
|
||
color: #723;
|
||
}
|
||
|
||
/* titles */
|
||
|
||
h1, h2, h3, h4, h5, h6 {
|
||
margin: 0;
|
||
padding: 0.7em 0 0.17em 0;
|
||
background: none;
|
||
color: #333;
|
||
font-family: Junicode, Baskerville, FreeSerif, \"Times New Roman\", serif;
|
||
font-weight: bold;
|
||
}
|
||
|
||
h2 {
|
||
color: #111;
|
||
border-bottom: 1px solid #BBB;
|
||
}
|
||
|
||
h4, h5, h6 {
|
||
color: #555;
|
||
font-family: Arial, sans-serif;
|
||
}
|
||
|
||
h1 { font-size: 185%; }
|
||
h2 { font-size: 160%; }
|
||
h3 { font-size: 140%; }
|
||
|
||
h4 { font-size: 105%; }
|
||
h5 { font-size: 95%; }
|
||
h6 { font-size: 90%; }
|
||
|
||
/* lists */
|
||
|
||
ul {
|
||
margin: 0.3em 0 0 1.5em;
|
||
padding: 0;
|
||
line-height: 1.6em;
|
||
list-style-type: square;
|
||
list-style-image: url('bullet.gif');
|
||
}
|
||
|
||
ol {
|
||
margin: 0.3em 0 0 3.2em;
|
||
padding: 0;
|
||
line-height: 1.6em;
|
||
list-style-image: none;
|
||
}
|
||
|
||
li {
|
||
margin-bottom: 0.1em;
|
||
}
|
||
|
||
dt {
|
||
margin-bottom: 0.1em;
|
||
font-weight: bold;
|
||
}
|
||
|
||
dl{
|
||
margin-top: 0.2em;
|
||
margin-bottom: 0.5em;
|
||
}
|
||
|
||
dd {
|
||
margin-left: 2em;
|
||
margin-bottom: 0.1em;
|
||
line-height: 1.6em;
|
||
}
|
||
|
||
/* tables */
|
||
|
||
table {
|
||
font-size: 100%;
|
||
border-spacing: 0;
|
||
}
|
||
|
||
table td, table th {
|
||
padding: 3px;
|
||
}
|
||
|
||
/*
|
||
* 3. Header
|
||
*/
|
||
|
||
#header {
|
||
margin: 0;
|
||
padding: 0;
|
||
background: #444 url('images/headerbg.jpg') top repeat-x;
|
||
border-bottom: 1px solid #000;
|
||
}
|
||
|
||
#header #logo {
|
||
margin: 0;
|
||
padding: 0;
|
||
text-align: center;
|
||
}
|
||
|
||
#header #logo img {
|
||
margin: 0;
|
||
padding: 0;
|
||
border: none;
|
||
}
|
||
|
||
#header #logo a {
|
||
margin: 0;
|
||
padding: 0;
|
||
color: #654;
|
||
text-decoration: none;
|
||
font-size: 0.8em;
|
||
}
|
||
|
||
|
||
/*
|
||
* 3. Navigation
|
||
*/
|
||
|
||
#nav {
|
||
margin: 0;
|
||
padding: 3px 4px 15px 4px;
|
||
background: #272727 url('images/navbg.png') repeat-x bottom;
|
||
text-align: center;
|
||
border-top: 1px solid #595959;
|
||
}
|
||
|
||
#nav ul, #nav li {
|
||
display: inline;
|
||
margin: 0;
|
||
padding: 0;
|
||
}
|
||
|
||
#nav li {
|
||
padding: 0 5px;
|
||
}
|
||
|
||
#nav a {
|
||
/*color: #A74;*/
|
||
/*color: #DBB672;*/
|
||
color: #B48648;
|
||
font-family: \"Trebuchet MS\", sans-serif;
|
||
font-weight: bold;
|
||
text-decoration: none;
|
||
}
|
||
|
||
#nav a:hover {
|
||
color: #CCC;
|
||
}
|
||
|
||
|
||
/*
|
||
* 4. Main
|
||
*/
|
||
|
||
#main {
|
||
margin: 0 8% 0 8%;
|
||
padding: 0 10px;
|
||
line-height: 1.6em;
|
||
}
|
||
html>body #main {
|
||
margin: 0 auto;
|
||
width: auto;
|
||
max-width: 66em;
|
||
}
|
||
|
||
#content {
|
||
margin: 10px 22px;
|
||
}
|
||
|
||
#lastmod {
|
||
margin: 10px 0;
|
||
padding: 8px 0;
|
||
font-size: 0.85em;
|
||
}
|
||
|
||
/*
|
||
* 5. Footer
|
||
*/
|
||
|
||
#footer {
|
||
margin: 10px 22px;
|
||
padding: 10px 0;
|
||
font-size: 0.85em;
|
||
border-top: 1px solid #999;
|
||
}
|
||
|
||
#footer a {
|
||
color: #333;
|
||
}
|
||
|
||
#footer .portlet a {
|
||
color: #246;
|
||
}
|
||
|
||
#footer .portlet a.new, #p-cactions .new a {
|
||
color: #900;
|
||
}
|
||
|
||
#note {
|
||
margin-top: 10px;
|
||
padding-top: 5px;
|
||
text-align: left;
|
||
}
|
||
|
||
#note p {
|
||
text-align: left;
|
||
line-height: 1em;
|
||
}
|
||
|
||
body {
|
||
margin: 0;
|
||
padding: 0;
|
||
background: #FFFBF0;
|
||
color: #111;
|
||
font: 0.88em sans-serif;
|
||
}
|
||
|
||
p {
|
||
margin: 0 0 1em 0;
|
||
}
|
||
|
||
table.main {
|
||
background: #8b898b;
|
||
}
|
||
|
||
table.title {
|
||
background: #ececec;
|
||
}
|
||
|
||
tr.row-0 {
|
||
background: #ececec;
|
||
}
|
||
|
||
tr.row-1{
|
||
background: #ccecec;
|
||
}
|
||
|
||
tr.header {
|
||
background: #dddddd;
|
||
}
|
||
|
||
td.title {
|
||
font-weight: bold;
|
||
}
|
||
|
||
td.percentage-0 {
|
||
background: #f5f5f5;
|
||
}
|
||
|
||
td.percentage-1 {
|
||
background: #e0f5f5;
|
||
}
|
||
|
||
td.translated {
|
||
color: #05a505;
|
||
text-align: center;
|
||
font-weight: bold;
|
||
}
|
||
|
||
td.fuzzy {
|
||
color: #0505a5;
|
||
text-align: center;
|
||
font-weight: bold;
|
||
}
|
||
|
||
td.untranslated {
|
||
color: #a50505;
|
||
text-align: center;
|
||
}
|
||
|
||
h4 {
|
||
margin: 1em 0 0 0;
|
||
}
|
||
|
||
a {
|
||
color: #A48736;
|
||
}
|
||
|
||
hr {
|
||
display: none;
|
||
}
|
||
|
||
/**
|
||
* Footer
|
||
*/
|
||
|
||
#footer {
|
||
clear: both;
|
||
margin: 0;
|
||
padding: 0 8% 0 8%;
|
||
color: #BBB;
|
||
font-size: 0.8em;
|
||
/* ie5win damn hack */
|
||
width: 100%;
|
||
}
|
||
html>body #footer {
|
||
width: 84%;
|
||
}
|
||
|
||
/**
|
||
* Footnotes
|
||
*/
|
||
|
||
#footnote {
|
||
margin: 0 0 12px 0;
|
||
padding: 0;
|
||
float: right;
|
||
text-align: right;
|
||
width: 40%;
|
||
}
|
||
</style>
|
||
|
||
<body>
|
||
<div id=\"global\">
|
||
<div id=\"header\">
|
||
<div id=\"logo\">
|
||
<a href=\"http://www.wesnoth.org/\"><img alt=\"Wesnoth logo\" src=\"images/wesnoth-logo.jpg\" /></a>
|
||
</div>
|
||
</div>
|
||
|
||
<div id=\"nav\">
|
||
<ul>
|
||
<li><a href=\"http://www.wesnoth.org/\">Home</a></li>
|
||
<li><a href=\"http://www.wesnoth.org/wiki/Play\">Play</a></li>
|
||
|
||
<li><a href=\"http://www.wesnoth.org/wiki/Create\">Create</a></li>
|
||
<li><a href=\"http://www.wesnoth.org/forum/\">Forums</a></li>
|
||
<li><a href=\"http://www.wesnoth.org/wiki/Support\">Support</a></li>
|
||
<li><a href=\"http://www.wesnoth.org/wiki/Project\">Project</a></li>
|
||
<li><a href=\"http://www.wesnoth.org/wiki/Credits\">Credits</a></li>
|
||
</ul>
|
||
</div>
|
||
|
||
<h2 style=\"display:inline\">Wesnoth translation stats</h2>
|
||
<div> <br/> </div><p style=\"display:inline\">Last update: <strong>
|
||
`LC_TIME="en_US.UTF-8" date`
|
||
</strong></p>
|
||
<div> <br/> </div>
|
||
<table class=\"main\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\"><tr><td>
|
||
<table cellspacing=\"1\" cellpadding=\"2\" border=\"0\" width=\"100%\">
|
||
<tr class=\"header\">
|
||
<td class=\"title\">File</td>
|
||
<td class=\"title\" align=\"center\">Status</td>
|
||
<td class=\"translated\">translated</td>
|
||
<td class=\"translated\"><strong>%</strong></td>
|
||
|
||
<td class=\"fuzzy\"><strong>fuzzy</strong></td>
|
||
<td class=\"fuzzy\"><strong>%</strong></td>
|
||
<td class=\"untranslated\"><strong>untranslated</strong></td>
|
||
<td class=\"untranslated\"><strong>%</strong></td>
|
||
<td class=\"title\">total</td>
|
||
<td class=\"title\">graph</td>
|
||
</tr>" >> $STATSFILE
|
||
|
||
for dir in `ls $BRANCH/wesnoth* -d`; do
|
||
file=$DIR"/"`basename $dir`"."$LCODE".po";
|
||
if [ ! -f $file ]; then
|
||
file=$BRANCH"/"`basename $dir`"/"$LCODE".po"
|
||
filename=$BRANCH`basename $dir`"/"$dir"."$LCODE
|
||
else
|
||
filename=`echo $file | sed s/.po//`
|
||
fi
|
||
npo=$(($npo + 1)); has_errors="no"; has_warnings="no";
|
||
|
||
# Extract the declared charset, may be we use this in future.
|
||
charset=`sed -n '/^"Content-Type:/ s/.*charset=\([a-zA-Z0-9_-]*\).*/\1/p' $file`
|
||
|
||
echo -n "Checking $file for UTF-8 inconsistencies... "
|
||
if $ISUTF8 <$file >/dev/null 2>&1; then
|
||
if ! echo $charset | grep -qi "UTF-8"; then
|
||
has_errors="yes"
|
||
echo -e $RED"FAILED; non UTF-8 charset declaration for UTF-8 content"$ENDCOLOR
|
||
echo "$file: non UTF-8 charset declared for UTF-8 content; expect to see 'charset=UTF-8'." >> $ERRORS
|
||
else
|
||
echo -e $GREEN"OK"$ENDCOLOR
|
||
fi
|
||
else
|
||
if echo $charset | grep -qi "UTF-8"; then
|
||
has_errors="yes"
|
||
echo -e $RED"FAILED; non UTF-8 content for UTF-8 charset declaration"$ENDCOLOR
|
||
echo "$file: UTF-8 charset declared for non UTF-8 content; expect to see a non UTF-8 charset." >> $ERRORS
|
||
else
|
||
echo -e $GREEN"OK"$ENDCOLOR
|
||
fi
|
||
fi
|
||
|
||
echo -n "Checking $file for odd characters... "
|
||
if grep -nH $ODD_CHARS $file >> $ERRORS; then
|
||
has_warnings="yes"
|
||
echo -e $RED"FAILED; odd characters found"$ENDCOLOR
|
||
echo "$file: one or more odd character from the '$ODD_CHARS' set found." >> $ERRORS
|
||
else
|
||
echo -e $GREEN"OK"$ENDCOLOR
|
||
fi
|
||
|
||
# Makes sense only if the file passed the UTF-8 check.
|
||
if [ "$has_errors" = "no" ]; then
|
||
echo -n "Checking $file with msgfmt... "
|
||
if ! LC_MESSAGES=C $MSGFMT --check -o /dev/null $file >> $ERRORS; then
|
||
has_errors="yes"
|
||
echo -e $RED"FAILED"$ENDCOLOR
|
||
else
|
||
echo -e $GREEN"OK"$ENDCOLOR
|
||
fi
|
||
fi
|
||
r=0; rf=0; ru=0; t=0; u=0; f=0; rt=0
|
||
if [ "$has_errors" = "yes" ]; then
|
||
nerror=$(($nerror + 1))
|
||
sum=0
|
||
st="Error"
|
||
if [ $STATUS = "OK" ]; then
|
||
STATUS="Error"
|
||
fi
|
||
if [ $STATUS = "Warning" ]; then
|
||
STATUS="Error"
|
||
fi
|
||
else
|
||
stat=`LC_MESSAGES=C $MSGFMT --statistics -o /dev/null $file 2>&1`
|
||
t=`echo "$stat" | sed -ne 's/\([0-9]\+\) translated .*/\1/p'`; t=${t:-0}
|
||
u=`echo "$stat" | sed -ne 's/.* \([0-9]\+\) untranslated .*/\1/p'`; u=${u:-0}
|
||
f=`echo "$stat" | sed -ne 's/.* \([0-9]\+\) fuzzy translation.*/\1/p'`; f=${f:-0}
|
||
|
||
sum=$(($t + $f + $u))
|
||
if [ ! "$sum" -eq 0 ]; then
|
||
rt=`printf '%s%d%s%d\n' "scale=2; 100*" $t "/" $sum | bc`
|
||
fi
|
||
|
||
if [ ! "$sum" -eq 0 ]; then
|
||
rf=`printf '%s%d%s%d\n' "scale=2; 100*" $f "/" $sum | bc`
|
||
fi
|
||
|
||
if [ ! "$sum" -eq 0 ]; then
|
||
ru=`printf '%s%d%s%d\n' "scale=2; 100*" $u "/" $sum | bc`
|
||
fi
|
||
|
||
nt=$(($nt + $t)); nu=$(($nu + $u)); nf=$(($nf + $f))
|
||
|
||
st="OK"
|
||
if [ "$has_warnings" = "yes" ]; then
|
||
nwarn=$(($nwarn + 1))
|
||
st='Warning'
|
||
if [ "$STATUS" = "OK" ]; then
|
||
STATUS='Warning'
|
||
fi
|
||
fi
|
||
fi
|
||
|
||
echo "<tr class=\"row-$CL\">" >> $STATSFILE
|
||
CL=$(( ($CL+1)%2 ))
|
||
echo " <td align=\"left\"><strong>`basename $filename`</strong></td>
|
||
<td class=\"percentage-$CL\" align=\"center\">$st</td>
|
||
<td class=\"row-$CL\" align=\"right\">$t</td>" >> $STATSFILE
|
||
printf '%s%d%s%.2f%s\n' " <td class=\"percentage-" $CL "\" align=\"right\">" $rt "</td>" >> $STATSFILE
|
||
echo " <td class=\"row-$CL\" align=\"right\">$f</td>" >> $STATSFILE
|
||
printf '%s%d%s%.2f%s\n' " <td class=\"percentage-" $CL "\" align=\"right\">" $rf "</td>" >> $STATSFILE
|
||
echo " <td class=\"row-$CL\" align=\"right\">$u</td>" >> $STATSFILE
|
||
printf '%s%d%s%.2f%s\n' " <td class=\"percentage-" $CL "\" align=\"right\">" $ru "</td>" >> $STATSFILE
|
||
echo " <td class=\"row-$CL\" align=\"right\">$sum</td>" >> $STATSFILE
|
||
n4=`printf '%s%f\n' "scale=2; 3*" $rt | bc`
|
||
n6=`printf '%s%f\n' "scale=2; 3*" $rf | bc`
|
||
n8=`printf '%s%f\n' "scale=2; 3*" $ru | bc`
|
||
printf '%s%.2f%s%.2f%s%.2f%s\n' " <td><img src=\"images/green.png\" height=\"15\" width=\"" $n4 "\" alt=\"translated\"/><img src=\"images/blue.png\" height=\"15\" width=\"" $n6 "\" alt=\"fuzzy\"/><img src=\"images/red.png\" height=\"15\" width=\"" $n8 "\" alt=\"untranslated\"/></td>" >> $STATSFILE
|
||
echo "</tr>" >> $STATSFILE
|
||
done
|
||
|
||
if [ "$npo" -eq 0 ]; then
|
||
echo -e $RED"No '${PO}.po' file under '$DIR'."$ENDCOLOR
|
||
exit 0
|
||
fi
|
||
|
||
if [ "$nerror" -gt 0 ]; then
|
||
echo -n -e $RED"Fatal errors found. See '"
|
||
tput smso; echo -n "$ERRORS"; tput rmso
|
||
echo -ne "' for details."$ENDCOLOR
|
||
echo ""
|
||
else
|
||
echo -ne $GREEN"No fatal errors found."$ENDCOLOR
|
||
echo ""
|
||
|
||
if [ -s "$ERRORS" ]; then
|
||
echo -n -e $RED" See '"
|
||
tput smso; echo -n "$ERRORS"; tput rmso
|
||
echo -ne "' for warnings."$ENDCOLOR
|
||
echo ""
|
||
else
|
||
rm -f $ERRORS
|
||
fi
|
||
fi
|
||
|
||
if [ "$npo" = "$nerror" ]; then
|
||
echo -en $RED"All files have fatal errors."$ENDCOLOR
|
||
echo ""
|
||
else
|
||
sum=$((${nt} + ${nf} + ${nu}))
|
||
nrt=`printf '%s%d%s%d\n' "scale=2; 100*" $nt "/" $sum | bc`
|
||
nrf=`printf '%s%d%s%d\n' "scale=2; 100*" $nf "/" $sum | bc`
|
||
nru=`printf '%s%d%s%d\n' "scale=2; 100*" $nu "/" $sum | bc`
|
||
|
||
echo "<tr class=\"title\">
|
||
<td align=\"left\"><strong>Total</strong></td>
|
||
<td align=\"center\"><strong>$STATUS</strong></td>
|
||
<td align=\"right\"><strong>$nt</strong></td>" >> $STATSFILE
|
||
printf '%s%.2f%s\n' "<td align=\"right\"><strong>" $nrt "</strong></td>" >> $STATSFILE
|
||
echo "<td align=\"right\"><strong>$nf</strong></td>" >> $STATSFILE
|
||
printf '%s%.2f%s\n' "<td align=\"right\"><strong>" $nrf "</strong></td>" >> $STATSFILE
|
||
echo "<td align=\"right\"><strong>$nu</strong></td>" >> $STATSFILE
|
||
printf '%s%.2f%s\n' "<td align=\"right\"><strong>" $nru "</strong></td>" >> $STATSFILE
|
||
echo "<td align=\"right\"><strong>$((${nt} + ${nf} + ${nu}))</strong></td>" >> $STATSFILE
|
||
|
||
nrt=`printf '%s%f\n' "scale=2; 3*" $nrt | bc`
|
||
nrf=`printf '%s%f\n' "scale=2; 3*" $nrf | bc`
|
||
nru=`printf '%s%f\n' "scale=2; 3*" $nru | bc`
|
||
|
||
printf '%s%.2f%s%.2f%s%.2f%s\n' "<td><img src=\"images/green.png\" height=\"15\" width=\"" $nrt "\" alt=\"translated\"/><img src=\"images/blue.png\" height=\"15\" width=\"" $nrf "\" alt=\"fuzzy\"/><img src=\"images/red.png\" height=\"15\" width=\"" $nru "\" alt=\"untranslated\"/></td>" >> $STATSFILE
|
||
echo "</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<div><br/></div>
|
||
<div id=\"footer\">
|
||
<div id=\"footnote\">
|
||
© 2003-"`date +%Y`" The Battle for Wesnoth<br/>
|
||
<br/>
|
||
<a href=\"http://validator.w3.org/check?uri=referer\"><img src=\"http://www.w3.org/Icons/valid-xhtml11-blue\"
|
||
alt=\"Valid XHTML 1.1!\" height=\"31\" width=\"88\" /></a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</body>
|
||
</html>" >> $STATSFILE
|
||
fi
|
||
done
|
||
|
||
# Exit with error count just because it may sense.
|
||
exit $nerror
|