1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-20 15:53:14 +02:00

[task/git-tools] Solve dependency on the GNU wc --max-line-length option

PHPBB3-9808
This commit is contained in:
Chris Smith 2010-09-07 23:35:47 +01:00
parent e17ffa01e6
commit 8ce2f63d73

View File

@ -55,11 +55,12 @@ quit()
fi
}
if [ "$(wc --max-line-length "$1" | cut -f1 -d" ")" -gt 80 ]
msg=$(grep -nE '.{81,}' "$1");
if [ $? -eq 0 ]
then
echo "The following lines are greater than 80 characters long:\n" >&2;
grep -nE '.{81,}' "$1" >&2;
echo $msg >&2;
quit $ERR_LENGTH;
fi