From 82c87e4bd416943db5238dd3073084f0e0ce6004 Mon Sep 17 00:00:00 2001 From: Garth Minette Date: Wed, 21 Oct 2020 00:23:12 -0700 Subject: [PATCH] Added linecount.sh script. --- scripts/linecount.sh | 17 +++++++++++++++++ version.scad | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100755 scripts/linecount.sh diff --git a/scripts/linecount.sh b/scripts/linecount.sh new file mode 100755 index 0000000..234d8cd --- /dev/null +++ b/scripts/linecount.sh @@ -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 + diff --git a/version.scad b/version.scad index 433989a..16aa8f6 100644 --- a/version.scad +++ b/version.scad @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////////////// -BOSL_VERSION = [2,0,455]; +BOSL_VERSION = [2,0,456]; // Section: BOSL Library Version Functions