Skip to content

Commit

Permalink
Properly capitalise language names
Browse files Browse the repository at this point in the history
  • Loading branch information
craigbarnes committed Jul 2, 2012
1 parent c9cb36a commit 60e62e6
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions tally
Original file line number Diff line number Diff line change
Expand Up @@ -17,52 +17,52 @@ print() {

count() {
case $2 in
awk|coffee|make|perl|python|sed|shell|tcl)
AWK|CoffeeScript|Make|Perl|Python|Sed|Shell|TCL)
let SUB[$2]+=$(sed -r '/^\s*(#|$)/d' $1 | wc -l);;
ruby)
Ruby)
let SUB[$2]+=$(sed -r '/^\s*(#|$)/d;/^=begin$/,/^=end$/d' $1 | wc -l);;
c|css|js|vala)
C|CSS|JavaScript|Vala)
let SUB[$2]+=$(stripc $1 | wc -l);;
sql|lua)
SQL|Lua)
let SUB[$2]+=$(sed -r '/^\s*(\-\-|$)/d' $1 | wc -l);;
html|mallard|xml)
HTML|Mallard|XML)
let SUB[$2]+=$(stripxml $1 | wc -l);;
esac
}

for F in $(find $@ -type f -not -path "*/.*"); do
case $F in
*.awk) count $F awk;;
*.c|*.h) count $F c;;
*.coffee) count $F coffee;;
*.css) count $F css;;
*.html) count $F html;;
*.lua) count $F lua;;
*.page) count $F mallard;;
*.js) count $F js;;
*.perl|*.pl|*.pm) count $F perl;;
*.py) count $F python;;
*.rb) count $F ruby;;
*.sed) count $F sed;;
*.sql) count $F sql;;
*.awk) count $F AWK;;
*.c|*.h) count $F C;;
*.coffee) count $F CoffeeScript;;
*.css) count $F CSS;;
*.html) count $F HTML;;
*.lua) count $F Lua;;
*.page) count $F Mallard;;
*.js) count $F JavaScript;;
*.perl|*.pl|*.pm) count $F Perl;;
*.py) count $F Python;;
*.rb) count $F Ruby;;
*.sed) count $F Sed;;
*.sql) count $F SQL;;
*.svg) ;; # Don't count SVG images in XML subtotal
*.tcl) count $F tcl;;
*.vala) count $F vala;;
*.xml|*.ui|*.glade) count $F xml;;
*.??sh) count $F shell;;
*[Mm]akefile|*.mk) count $F make;;
*.tcl) count $F TCL;;
*.vala) count $F Vala;;
*.xml|*.ui|*.glade) count $F XML;;
*.??sh) count $F Shell;;
*[Mm]akefile|*.mk) count $F Make;;
*) case "$(sed -rn '1s|(\#!.*/(env\s*)?)?(.*)|\3|p' $F)" in
awk*) count $F awk;;
coffee*) count $F coffee;;
lua*) count $F lua;;
perl*) count $F perl;;
python*) count $F python;;
ruby*) count $F ruby;;
sed*) count $F sed;;
*html*) count $F html;;
*mallard*) count $F mallard;;
*xml*) count $F xml;;
??sh*) count $F shell;;
awk*) count $F AWK;;
coffee*) count $F CoffeeScript;;
lua*) count $F Lua;;
perl*) count $F Perl;;
python*) count $F Python;;
ruby*) count $F Ruby;;
sed*) count $F Sed;;
*html*) count $F HTML;;
*mallard*) count $F Mallard;;
*xml*) count $F XML;;
??sh*) count $F Shell;;
esac;;
esac
done
Expand Down

0 comments on commit 60e62e6

Please sign in to comment.