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:
authorErich Eckner <git@eckner.net>2017-07-03 15:17:19 +0200
committerErich Eckner <git@eckner.net>2017-07-03 15:17:19 +0200
commit114b31df46909d1cafb339b762c74635b30bfa5a (patch)
tree3ac2d4b1f8590456e57c705d28751d1edb18a2a1 /bin/build-master-status
parent7f1b05846122571fadb3cb09a077710d45d5356c (diff)
bin/build-master-status: buffer output to broken_output
Diffstat (limited to 'bin/build-master-status')
-rwxr-xr-xbin/build-master-status86
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