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

Last change on this file since 2839 was 2839, checked in by Mathieu Morlighem, 15 years ago

minor

  • Property svn:executable set to *
File size: 678 bytes
Line 
1#!/bin/bash
2#get number of lines of code
3
4#get Matlab number of lines
5cd $ISSM_DIR/src/m
6M_LOC=$(find . -name "*.m" -exec wc -l '{}' \; | awk '{ sum += $1 } END { print sum}');
7echo "Matlab code: $M_LOC"
8
9#get C/CPP number of lines
10cd $ISSM_DIR/src
11CPP_LOC=$(find . -name "*.cpp" -exec wc -l '{}' \; | awk '{ sum += $1 } END { print sum}');
12echo "C++ code: $CPP_LOC"
13C_LOC=$(find . -name "*.c" -exec wc -l '{}' \; | awk '{ sum += $1 } END { print sum}');
14echo "C code: $C_LOC"
15H_LOC=$(find . -name "*.h" -exec wc -l '{}' \; | awk '{ sum += $1 } END { print sum}');
16echo "header code: $H_LOC"
17
18#print total
19let SUM=$M_LOC+$CPP_LOC+$C_LOC+$H_LOC
20echo "Total : $SUM"
Note: See TracBrowser for help on using the repository browser.