From 253ed034f0af1ea2280c811293f77ae9fa244a6c Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Mon, 29 May 2017 16:59:34 +0100 Subject: [PATCH] Add tool to count LOC --- tools/loc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 tools/loc diff --git a/tools/loc b/tools/loc new file mode 100755 index 000000000..6fd3a78e9 --- /dev/null +++ b/tools/loc @@ -0,0 +1,24 @@ +#!/bin/bash + +DOC=`find doc -type f -exec cat {} \; | wc -l` +TESTS=`find kayobe/tests -type f -exec cat {} \; | wc -l` +CLI=`find kayobe -type f -exec cat {} \; | wc -l` +ANSIBLE=`find ansible -type f -exec cat {} \; | wc -l` + +ETC=`find etc -type f -exec cat {} \; | wc -l` +TOOLS=`find tools -type f -exec cat {} \; | wc -l` + +CORE=$(($CLI+$ANSIBLE+$TESTS+$DOC)) +SUPP=$(($ETC+$TOOLS)) +TOTAL=$(($CORE+$SUPP)) + + +echo "CLI $CLI" +echo "Ansible $ANSIBLE" +echo "Doc $DOC" +echo "Etc $ETC" +echo "Tests $TESTS" +echo "" +echo "Core Code $CORE" +echo "Support Code $SUPP" +echo "Total Code $TOTAL"