source: issm/trunk/scripts/getloc.sh@ 11527

Last change on this file since 11527 was 11527, checked in by Mathieu Morlighem, 13 years ago

merged trunk-jpl and trunk for revision 11526

  • Property svn:executable set to *
File size: 1.0 KB
RevLine 
[2057]1#!/bin/bash
2#get number of lines of code
[11527]3cloc-1.55.pl $ISSM_TIER/src $ISSM_TIER/m4 --exclude-dir=.svn --exclude-ext=exp --exclude-lang=make --out=temp
[10605]4cat temp
5./cloc2html.py
6rm temp
[2057]7
[10605]8cat $ISSM_TIER/src/dox/issm.dox | sed '/<table/,//d' > input1
9cat $ISSM_TIER/src/dox/issm.dox | sed '1,/<\/table>/d' > input2
[10612]10cat input1 temp.html input2 > $ISSM_TIER/src/dox/issm.dox
[10605]11rm input1 input2 temp.html
12
13exit 1
14
15
16
17
18
19#OLDER MANUAL VESION
[2057]20#get Matlab number of lines
[6088]21cd $ISSM_TIER/src/m
[2057]22M_LOC=$(find . -name "*.m" -exec wc -l '{}' \; | awk '{ sum += $1 } END { print sum}');
23echo "Matlab code: $M_LOC"
24
25#get C/CPP number of lines
[6088]26cd $ISSM_TIER/src
[2057]27CPP_LOC=$(find . -name "*.cpp" -exec wc -l '{}' \; | awk '{ sum += $1 } END { print sum}');
28echo "C++ code: $CPP_LOC"
29C_LOC=$(find . -name "*.c" -exec wc -l '{}' \; | awk '{ sum += $1 } END { print sum}');
30echo "C code: $C_LOC"
31H_LOC=$(find . -name "*.h" -exec wc -l '{}' \; | awk '{ sum += $1 } END { print sum}');
32echo "header code: $H_LOC"
33
34#print total
35let SUM=$M_LOC+$CPP_LOC+$C_LOC+$H_LOC
[4909]36echo "Total : $SUM"
Note: See TracBrowser for help on using the repository browser.