From a3325252203e512ce7e4dcf585a94a1aa0eb1da6 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sat, 11 Nov 2017 17:45:27 +0100 Subject: bin/build-master-status: enumerate TODOs --- bin/build-master-status | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'bin/build-master-status') diff --git a/bin/build-master-status b/bin/build-master-status index aacf40e..9f54031 100755 --- a/bin/build-master-status +++ b/bin/build-master-status @@ -441,24 +441,30 @@ if ${web}; then '' \ '' find "${base_dir}/bin/" "${base_dir}/conf/" -type f \ - -exec sed -n ' - s/^\s*#\s*TODO:\s*// + -exec grep -nHF '' '{}' \; | \ + awk ' + { print $0 } + /^[^:]+:[0-9]+:\s*#\s*TODO:/{print ++i} + ' | \ + sed -n ' + s/^\([^:]\+:[0-9]\+:\)\s*#\s*TODO:\s*/\1/ T + N + s/^\([^:]\+:[0-9]\+:\)\(.*\)\n\([0-9]\+\)$/\1\3:\2/ :a N - s/\s*\n\s*#/\n/ + s/\([^:]\+:\)\([0-9]\+:[^\n]*\S\)\s*\n\1[0-9]\+:\s*#/\1\2\n/ ta s/\n\n\+/\n/g s/\n[^\n]*$/\n/ - i {} - = + s/^\([^:\n]\+\):\([0-9]\+\):\([0-9]\+\):/\1\n\2\n\3\n/ p - ' {} \; | \ + ' | \ sed ' :a N /\n$/!ba - s|^[^\n]*/\([^/\n]\+/[^/\n]\+\)\n\([0-9]\+\)\n|\1 (line \2):\n| + s|^[^\n]*/\([^/\n]\+/[^/\n]\+\)\n\([0-9]\+\)\n\([0-9]\+\)\n|TODO #\3 - \1 (line \2):\n| ' | \ sed ' s|$|
| -- cgit v1.2.3-70-g09d2