forked from rhelgeby/sm-zombiereloaded-3
-
Notifications
You must be signed in to change notification settings - Fork 4
/
codesummary.sh
executable file
·27 lines (21 loc) · 1.11 KB
/
codesummary.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
cd src/
echo "$(hg tip)\n"
LINES_MAIN=`wc *.sp -l | cut -d ' ' -f1`
LINES_OTHER=`wc zr/*.* -l | tail -n1 | sed 's/^ *\(.*\) *$/\1/' | cut -d ' ' -f1`
LINES_PLAYERCLASSES=`wc zr/playerclasses/*.* -l | tail -n1 | sed 's/^ *\(.*\) *$/\1/' | cut -d ' ' -f1`
LINES_SOUNDEFFECTS=`wc zr/soundeffects/*.* -l | tail -n1 | sed 's/^ *\(.*\) *$/\1/' | cut -d ' ' -f1`
LINES_VISUALEFFECTS=`wc zr/visualeffects/*.* -l | tail -n1 | sed 's/^ *\(.*\) *$/\1/' | cut -d ' ' -f1`
LINES_VOLFEATURES=`wc zr/volfeatures/*.* -l | tail -n1 | sed 's/^ *\(.*\) *$/\1/' | cut -d ' ' -f1`
LINES_WEAPONS=`wc zr/weapons/*.* -l | tail -n1 | sed 's/^ *\(.*\) *$/\1/' | cut -d ' ' -f1`
LINES_TOTAL="$(($LINES_MAIN + $LINES_OTHER + $LINES_PLAYERCLASSES + $LINES_SOUNDEFFECTS + $LINES_VISUALEFFECTS + $LINES_VOLFEATURES + $LINES_WEAPONS))"
echo "Number of lines:"
echo "$LINES_MAIN\tmain sp"
echo "$LINES_OTHER\tother"
echo "$LINES_PLAYERCLASSES\tplayerclasses"
echo "$LINES_SOUNDEFFECTS\tsoundeffects"
echo "$LINES_VISUALEFFECTS\tvisualeffects"
echo "$LINES_VOLFEATURES\tvolfeatures"
echo "$LINES_WEAPONS\tweapons"
echo "\nTotal:"
echo "$LINES_TOTAL"