Skip to content
Browse files

added script to count lines of code in project - excludes kazmath and…

… others
  • Loading branch information...
1 parent e1c087a commit 5698e901f9e3b50166f56b00feaf33bd9c3d22b1 chris committed Jul 16, 2012
Showing with 13 additions and 0 deletions.
  1. +13 −0 loc.sh
View
13 loc.sh
@@ -0,0 +1,13 @@
+#/bin/sh
+# much improved by Jonathan Leffler on stackoverflow
+
+git diff --stat `git hash-object -t tree /dev/null` |
+# not my code
+grep -v "^ kazmath" |
+grep -E -v "\.(png|gbo|obj|txt|md|blend) " |
+# not my code
+grep -v "obj2opengl\.pl " |
+sed -e 's/+*$//' -e '$d' |
+cut -d '|' -f 2 |
+awk '{sum += $1 } END { print "lines of code " sum }'
+

0 comments on commit 5698e90

Please sign in to comment.
Something went wrong with that request. Please try again.