forked from scallyw4g/bonsai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sloc.sh
executable file
·19 lines (17 loc) · 987 Bytes
/
sloc.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! /bin/bash
META_SLOC=$(find generated -name \*.cpp -print -o -name \*.h -print | xargs cat | wc -l)
EXMP_SLOC=$(find examples -name \*.cpp -print -o -name \*.h -print | xargs cat | wc -l)
DEPS_SLOC=$(find external -name \*.cpp -print -o -name \*.h -print | xargs cat | wc -l)
POOF_SLOC=$(find src -name \*.cpp -print -o -name \*.h -print | xargs cat | wc -l)
SHDR_SLOC=$(find shaders -type f | xargs cat | wc -l)
STD_SHDR_SLOC=$(find external/bonsai_stdlib/shaders -type f | xargs cat | wc -l)
echo ""
echo " Hand written $POOF_SLOC"
echo " Deps $DEPS_SLOC"
echo " Poof'd code $META_SLOC"
echo " Examples $EXMP_SLOC"
echo " Shaders $SHDR_SLOC"
echo " stdlib/shaders $STD_SHDR_SLOC"
echo "--------------------------"
echo " Total $(( POOF_SLOC + SHDR_SLOC + EXMP_SLOC + META_SLOC + DEPS_SLOC + PRNT_SLOC + STD_SHDR_SLOC )) sloc"
echo ""