0.pre8.34
[sbcl/lichteblau.git] / wc.sh
blob1cc99c7987c0790750ffc2fbfb3ec4142a3b7b83
1 #!/bin/sh
3 # How big is this project anyway? Crudely estimate non-comment source lines..
5 echo -n "approximate Lisp source lines: "
6 find . -name "*.lisp" -print | xargs egrep -hs '^[ ]*[^ ;]' | wc -l
7 echo -n "approximate Lisp source non-whitespace chars: "
8 find . -name "*.lisp" -print | xargs egrep -hs '^[ ]*[^ ;]' \
9 | perl -ne 's/\s//g ; print' | wc -c
10 # some errors in Lisp counting above:
11 # * doesn't catch #| .. |#
12 # * doesn't catch #+NIL convention for commenting out forms
13 # * doesn't catch stale source files which are no longer used
15 echo -n "approximate C source lines: "
16 find . -name "*.[ch]" -print | xargs egrep -s '^[ ]*[^ /*]' | wc -l
17 # errors:
18 # * only crudely approximates "/*"-style commenting (using the assumption
19 # that all lines beginning with "/" or "*" are beginning of comments or
20 # continuation of comments respectively)
21 # * doesn't catch #if 0 convention for commenting out blocks
22 # * doesn't catch stale source files which are no longer used
24 echo "(ignoring .sh, .S, etc.)"