mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[task/git-tools] Solve dependency on the GNU wc --max-line-length option
PHPBB3-9808
This commit is contained in:
parent
e17ffa01e6
commit
8ce2f63d73
1 changed files with 4 additions and 3 deletions
|
@ -55,11 +55,12 @@ quit()
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$(wc --max-line-length "$1" | cut -f1 -d" ")" -gt 80 ]
|
msg=$(grep -nE '.{81,}' "$1");
|
||||||
|
|
||||||
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "The following lines are greater than 80 characters long:\n" >&2;
|
echo "The following lines are greater than 80 characters long:\n" >&2;
|
||||||
|
echo $msg >&2;
|
||||||
grep -nE '.{81,}' "$1" >&2;
|
|
||||||
|
|
||||||
quit $ERR_LENGTH;
|
quit $ERR_LENGTH;
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue