From 114b31df46909d1cafb339b762c74635b30bfa5a Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 3 Jul 2017 15:17:19 +0200 Subject: bin/build-master-status: buffer output to broken_output --- bin/build-master-status | 86 ++++++++++++++++++++++++------------------------- 1 file changed, 43 insertions(+), 43 deletions(-) (limited to 'bin') 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 '\n\nbuild logs
\n\n' - printf '' \ - 'package' \ - 'git revision' \ - 'modification git revision' \ - 'package repository' \ - 'compilations' - printf '\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 '' - printf '' \ - "${pkg}" \ - "${rev}" \ - "${mod_rev}" \ - "${repo}" \ - "${count}" - printf '\n' - done - else - cat - fi >> \ - "${broken_output}" - if ${nice}; then - printf '
%s
%s
\n\n\n' >> \ - "${broken_output}" - fi + printf '\n\nbuild logs
\n\n' + printf '' \ + 'package' \ + 'git revision' \ + 'modification git revision' \ + 'package repository' \ + 'compilations' + printf '\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 '' + printf '' \ + "${pkg}" \ + "${rev}" \ + "${mod_rev}" \ + "${repo}" \ + "${count}" + printf '\n' + done + else + cat + fi + if ${nice}; then + printf '
%s
%s
\n\n\n' + fi + ) | \ + sponge "${broken_output}" fi -- cgit v1.2.3-70-g09d2