aboutsummaryrefslogtreecommitdiffstats
path: root/todo.sh
blob: 1215ededd7546da58438d4f18abcd77004ffe8a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

#
# Searches for all TODOs and tosses them in a file.
#
TODO_COUNT=0
rm -f TODOS
touch TODOS

for file in $(find {src,Shaders,Scripts} -type f -name '*' -print)
do
	echo "########################################" >> TODOS
	echo $file >> TODOS
	echo "========================================" >> TODOS
	grep -n -B 5 -A 5 "TODO" $file | sed s/^--/========================================/g >> TODOS
	TODO_COUNT=$((TODO_COUNT+$(grep -c "TODO" $file)))
done

echo "Found" $TODO_COUNT "TODOs."