diff options
author | Erich Eckner <git@eckner.net> | 2017-07-03 15:17:19 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-07-03 15:17:19 +0200 |
commit | 114b31df46909d1cafb339b762c74635b30bfa5a (patch) | |
tree | 3ac2d4b1f8590456e57c705d28751d1edb18a2a1 /bin | |
parent | 7f1b05846122571fadb3cb09a077710d45d5356c (diff) | |
download | builder-114b31df46909d1cafb339b762c74635b30bfa5a.tar.xz |
bin/build-master-status: buffer output to broken_output
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/build-master-status | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/bin/build-master-status b/bin/build-master-status index 8eb1b7e..637c76a 100755 --- a/bin/build-master-status +++ b/bin/build-master-status @@ -182,48 +182,48 @@ if [ $((${testing}+${staging}+${pending_packages}-${broken})) -ne 0 ]; then fi if [ -n "${broken_output}" ]; then - if ${nice}; then - printf '<html>\n<body>\n<a href="build-logs/">build logs</a><br>\n<table>\n<tr>' - printf '<th>%s</th>' \ - 'package' \ - 'git revision' \ - 'modification git revision' \ - 'package repository' \ - 'compilations' - printf '</tr>\n' - fi > \ - "${broken_output}" - ls "${work_dir}/package-states" | \ - grep '\.broken$' | \ - sed 's|\.broken$||' | \ + ( if ${nice}; then - sed 's|^\(\(.\+\)\.\([^.]\+\)\.\([^.]\+\)\.\([^.]\+\)\)$|\1 \2 \3 \4 \5|' | \ - while read -r sf pkg rev mod_rev repo; do - printf '%s ' \ - "${pkg}" \ - "${rev}" \ - "${mod_rev}" \ - "${repo}" \ - "$(wc -l < "${work_dir}/package-states/${sf}.broken")" - printf '\n' - done | \ - sort -k5n,5 | \ - while read -r pkg rev mod_rev repo count; do - printf '<tr>' - printf '<td>%s</td>' \ - "${pkg}" \ - "${rev}" \ - "${mod_rev}" \ - "${repo}" \ - "${count}" - printf '</tr>\n' - done - else - cat - fi >> \ - "${broken_output}" - if ${nice}; then - printf '</table>\n</body>\n</html>\n' >> \ - "${broken_output}" - fi + printf '<html>\n<body>\n<a href="build-logs/">build logs</a><br>\n<table>\n<tr>' + printf '<th>%s</th>' \ + 'package' \ + 'git revision' \ + 'modification git revision' \ + 'package repository' \ + 'compilations' + printf '</tr>\n' + fi + ls "${work_dir}/package-states" | \ + grep '\.broken$' | \ + sed 's|\.broken$||' | \ + if ${nice}; then + sed 's|^\(\(.\+\)\.\([^.]\+\)\.\([^.]\+\)\.\([^.]\+\)\)$|\1 \2 \3 \4 \5|' | \ + while read -r sf pkg rev mod_rev repo; do + printf '%s ' \ + "${pkg}" \ + "${rev}" \ + "${mod_rev}" \ + "${repo}" \ + "$(wc -l < "${work_dir}/package-states/${sf}.broken")" + printf '\n' + done | \ + sort -k5n,5 | \ + while read -r pkg rev mod_rev repo count; do + printf '<tr>' + printf '<td>%s</td>' \ + "${pkg}" \ + "${rev}" \ + "${mod_rev}" \ + "${repo}" \ + "${count}" + printf '</tr>\n' + done + else + cat + fi + if ${nice}; then + printf '</table>\n</body>\n</html>\n' + fi + ) | \ + sponge "${broken_output}" fi |