mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[task/git-tools] Solve dependency on the GNU wc --max-line-length option
PHPBB3-9808
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user