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:
Igor Wiedler 2010-09-09 00:20:38 +02:00
commit 2e891c5eba

View file

@ -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;