More animation work
[potpourri.git] / count_lines.sh
blobc53da458de0d75590269bcc266e64eb71eb18e87
1 #!/bin/bash
3 # this is supposed to count lines
5 export CC=gcc
7 if [ ! -e "ncsl" ]
8 then
9 $CC ncsl.c -o ncsl
12 export TOTAL=0
13 for src_file in $(find src > t ; find include >> t ; cat t ; rm t)
16 if [[ ! $src_file =~ "~$" ]] && [[ $(file $src_file) =~ "ASCII C++" ]]
17 then
18 export TOTAL=$(bc <<< "$TOTAL + $(./ncsl -t -b $src_file)")
20 done
22 echo "Total number of lines of code :" $TOTAL