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