turned off debugging noise.
[feisty_meow.git] / scripts / buildor / buildor_count_code.sh
1 #!/bin/bash
2
3 export OUT="$(mktemp "$TMP/zz_code_count.XXXXXX")"
4
5 find $* -iname "*.cpp" -o -iname "*.h" -o -iname "*.c" >$OUT
6
7 TOTALS=0
8 for i in $(cat $OUT); do
9   count=$(grep -h -v -c "^[ ]*$" $i)
10   TOTALS=$(expr $TOTALS + $count)
11 #hmmm: is there a better way to do the addition?
12 done
13
14 rm $OUT
15
16 echo total lines of code=$TOTALS
17