aboutsummaryrefslogtreecommitdiffstats
path: root/todo.sh
blob: e065a76e890fe4b7357843bacd7ce3abd530358d (plain)
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
28
#!/bin/bash

#
# Searches for all TODOs and tosses them in a file.
#
TODO_COUNT=0
rm -f TODOS
touch TODOS
for file in include/*.hpp
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

for file in src/*.cpp
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."
vim TODOS