File: klocs

package info (click to toggle)
dolfin 2018.1.0.post1-16
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 28,764 kB
  • sloc: xml: 104,040; cpp: 98,856; python: 22,511; makefile: 204; sh: 182
file content (17 lines) | stat: -rwxr-xr-x 627 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

# klocs
#
# Count the number of kilos of lines of code (klocs)
# in the directory src.
#
# This script should be run from the top level directory.
                                                                                                    
IMPL=`find dolfin -name '*.cpp' | xargs wc -l | grep total | awk '{ printf "%d", $1/1000 }'`
HEAD=`find dolfin -name '*.h'   | grep -v elements | grep -v ffc-forms | xargs wc -l | grep total | awk '{ printf "%d", $1/1000 }'`

TOTAL=`echo $IMPL $HEAD | awk '{ print $1 + $2 }'`

echo $HEAD' klocs in .h files'
echo $IMPL' klocs in .cpp files'
echo $TOTAL' klocs total'