Added linecount.sh script.

This commit is contained in:
Garth Minette 2020-10-21 00:23:12 -07:00
parent b3271b59c2
commit 82c87e4bd4
2 changed files with 18 additions and 1 deletions

17
scripts/linecount.sh Executable file
View file

@ -0,0 +1,17 @@
#!/bin/bash
lib_comment_lines=$(grep '^// ' *.scad | wc -l)
lib_code_lines=$(grep '^ *[^ /]' *.scad | wc -l)
script_code_lines=$(grep '^ *[^ /]' scripts/*.sh scripts/*.py | wc -l)
example_code_lines=$(grep '^ *[^ /]' examples/*.scad | wc -l)
test_code_lines=$(grep '^ *[^ /]' tests/*.scad | wc -l)
tutorial_lines=$(grep '^ *[^ /]' tutorials/*.md | wc -l)
y=$(printf "%06d" 13)
printf "Documentation Lines : %6d\n" $(($lib_comment_lines+$tutorial_lines))
printf "Example Code Lines : %6d\n" $example_code_lines
printf "Library Code Lines : %6d\n" $lib_code_lines
printf "Support Script Lines: %6d\n" $script_code_lines
printf "Test Code Lines : %6d\n" $test_code_lines

View file

@ -8,7 +8,7 @@
//////////////////////////////////////////////////////////////////////
BOSL_VERSION = [2,0,455];
BOSL_VERSION = [2,0,456];
// Section: BOSL Library Version Functions