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