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

Last change on this file since 6088 was 6088, checked in by Eric.Larour, 14 years ago

Updated all routines to take into account ISSM_DIR AND ISSM_TIER environment variables

  • Property svn:executable set to *
File size: 679 bytes
Line 
1#!/bin/bash
2#get number of lines of code
3
4#get Matlab number of lines
5cd $ISSM_TIER/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_TIER/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.