mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-26 20:08:55 +00:00
Merge branch 'task/cs278/git-tools' into develop-olympus
* task/cs278/git-tools: [task/git-tools] Change the GNU --lines argument to the POSIX -l [task/git-tools] Solve dependency on the GNU wc --max-line-length option
This commit is contained in:
commit
2e891c5eba
1 changed files with 5 additions and 4 deletions
|
@ -55,16 +55,17 @@ 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
|
||||||
|
|
||||||
lines=$(wc --lines "$1" | cut -f1 -d" ");
|
lines=$(wc -l "$1" | awk '{ print $1; }');
|
||||||
expecting=header;
|
expecting=header;
|
||||||
in_description=0;
|
in_description=0;
|
||||||
in_empty=0;
|
in_empty=0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue