Created
April 4, 2013 09:45
-
-
Save paulvollmer/5309143 to your computer and use it in GitHub Desktop.
count the lines of code based on https://github.com/unconed/TermKit/blob/master/sloc.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
loc=0 | |
dirs="src foo bar" | |
for dir in $dirs; do | |
files=`find $dir -type f | egrep -v "svn" | egrep -v "(DS_Store|pdf|svn|sql|png|txt|swfupload)"` | |
lines=`wc -l $files | tail -1 | sed "s/total//g"` | |
loc=$(($loc + $lines)) | |
done | |
echo "Lines of code: $loc (not including libraries / externals)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment