Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-11-11 17:45:27 +0100
committerErich Eckner <git@eckner.net>2017-11-11 17:45:27 +0100
commita3325252203e512ce7e4dcf585a94a1aa0eb1da6 (patch)
tree48b4f0a2494df2fcb0d6eaab2e30b6e681b5add3
parent7761468ff9981136237bdf269380312eec4abd6f (diff)
bin/build-master-status: enumerate TODOs
-rwxr-xr-xbin/build-master-status20
1 files changed, 13 insertions, 7 deletions
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
'</head>' \
'<body>'
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|$|<br>|