From cbd154a4834f56146dbe744ee2d2c6dccc04c5cb Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Thu, 5 Jan 2017 07:31:32 -0500 Subject: todo finder --- todo.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 todo.sh (limited to 'todo.sh') diff --git a/todo.sh b/todo.sh new file mode 100755 index 0000000..5f053a2 --- /dev/null +++ b/todo.sh @@ -0,0 +1,27 @@ +#!/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." -- cgit v1.2.3