From b8cdcaeb75bf2aba95323f2e7b4ebd05f4abd54d Mon Sep 17 00:00:00 2001 From: James Shubin Date: Thu, 10 Mar 2016 04:23:29 -0500 Subject: [PATCH] Switch bc for awk This is useful in dumb environments *cough* travis, that apparently don't have bc as a default :( --- test/test-golint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-golint.sh b/test/test-golint.sh index 0fdb03c9..13de4f3d 100755 --- a/test/test-golint.sh +++ b/test/test-golint.sh @@ -38,7 +38,7 @@ cd "$XPWD" >/dev/null rm -rf "$T" [ "$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 "Prev. # of issues: $COUNT"