Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/build-master-status
diff options
context:
space:
mode:
Diffstat (limited to 'bin/build-master-status')
-rwxr-xr-xbin/build-master-status56
1 files changed, 17 insertions, 39 deletions
diff --git a/bin/build-master-status b/bin/build-master-status
index b9e4f87..db118e6 100755
--- a/bin/build-master-status
+++ b/bin/build-master-status
@@ -55,46 +55,24 @@ fi
tmp_dir=$(mktemp -d 'tmp.build-master-status.XXXXXXXXXX' --tmpdir)
trap 'rm -rf --one-file-system "${tmp_dir}"' EXIT
-{
- printf '%s\n' \
- '<html>' \
- '<head>' \
- '<title>Todos in the build scripts</title>' \
- '</head>' \
- '<body>'
- find "${base_dir}/bin/" "${base_dir}/conf/" -type f \
- -exec grep -nHF '' '{}' \; | \
- awk '
- { print $0 }
- /^[^:]+:[0-9]+:\s*#\s*TODO:/{print ++i}
- ' | \
- sed -n '
- s/^\([^:]\+\):\([0-9]\+\):\s*#\s*TODO:\s*/\1\n\2\n/
- T
- N
- s/\n\(.*\)\n\([0-9]\+\)$/\n\2\n\1/
- :a
- N
- s/\n[^:\n]\+:[0-9]\+:[ \t]*#[ \t]*\(\S[^\n]*\)$/\n\1/
- ta
- s/\n[^:\n]\+:[0-9]\+:[^\n]*$/\n/
- p
- ' | \
- tee "${tmp_dir}/todos" | \
- sed '
- :a
+find "${base_dir}/bin/" "${base_dir}/conf/" -type f \
+ -exec grep -nHF '' '{}' \; | \
+ awk '
+ { print $0 }
+ /^[^:]+:[0-9]+:\s*#\s*TODO:/{print ++i}
+ ' | \
+ sed -n '
+ s/^\([^:]\+\):\([0-9]\+\):\s*#\s*TODO:\s*/\1\n\2\n/
+ T
+ N
+ s/\n\(.*\)\n\([0-9]\+\)$/\n\2\n\1/
+ :a
N
- /\n$/!ba
- s|^[^\n]*/\([^/\n]\+/[^/\n]\+\)\n\([0-9]\+\)\n\([0-9]\+\)\n|<a href="#TODO\2" name="TODO\2">TODO #\2</a> - <a href="https://github.com/archlinux32/builder/blob/master/\1#L\3">\1 (line \3)</a>:\n|
- ' | \
- sed '
- s|$|<br>|
- '
- printf '%s\n' \
- '</body>' \
- '</html>'
-} > \
- "${tmp_dir}/todos.html"
+ s/\n[^:\n]\+:[0-9]\+:[ \t]*#[ \t]*\(\S[^\n]*\)$/\n\1/
+ ta
+ s/\n[^:\n]\+:[0-9]\+:[^\n]*$/\n/
+ p
+ ' > "${tmp_dir}/todos"
if [ -s "${tmp_dir}/todos" ]; then
sed '