#! /usr/bin/env bash LAST_DIR="$PWD" cd "$(dirname "$0")/.." || exit 1 SLOC=$(tool/sloc) SLOCT=$(tool/sloct) SLOD=$(tool/slod) SLODT=$(tool/slodt) echo "\ lines of code: $SLOC lines of documentation: $SLOD lines of code and documentation: $((SLOC + SLOD)) ratio of code to documentation: $(echo "scale=1; $SLOC/$SLOD" | bc) lines of test code: $SLOCT lines of test documentation: $SLODT lines of test code and test documentation: $((SLOCT + SLODT)) ratio of test code to test documentation: $(echo "scale=1; $SLOCT/$SLODT" | bc) lines of all code: $((SLOC + SLOCT)) lines of all documentation: $((SLOD + SLODT)) lines of all code and all documentation: $((SLOC + SLOD + SLOCT + SLODT)) ratio of all code to all documentation: $(echo "scale=1; $((SLOC + SLOCT))/$((SLOD + SLODT))" | bc)" cd "$LAST_DIR" || exit 1