Switch bc for awk

This is useful in dumb environments *cough* travis, that apparently
don't have bc as a default :(
This commit is contained in:
James Shubin
2016-03-10 04:23:29 -05:00
parent 6b6dc75152
commit b8cdcaeb75

View File

@@ -38,7 +38,7 @@ cd "$XPWD" >/dev/null
rm -rf "$T" rm -rf "$T"
[ "$LINT1" = "" ] && echo PASS && exit # everything is "perfect" [ "$LINT1" = "" ] && echo PASS && exit # everything is "perfect"
DELTA=$(printf "%.0f\n" `echo "(($COUNT1 - $COUNT) / $DIFF1) * 100" | bc -l`) DELTA=$(printf "%.0f\n" `echo - | awk "{ print (($COUNT1 - $COUNT) / $DIFF1) * 100 }"`)
echo "Lines of code: $DIFF1" echo "Lines of code: $DIFF1"
echo "Prev. # of issues: $COUNT" echo "Prev. # of issues: $COUNT"