From 2b5be37206f08d8cc72b682d578bbbecd1dc048e Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 18 Oct 2017 15:31:57 +0200 Subject: bin/filter-build-logs new for displaying namcap-output on the webserver --- bin/filter-build-logs | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100755 bin/filter-build-logs (limited to 'bin/filter-build-logs') diff --git a/bin/filter-build-logs b/bin/filter-build-logs new file mode 100755 index 0000000..36f83f0 --- /dev/null +++ b/bin/filter-build-logs @@ -0,0 +1,61 @@ +#!/bin/sh + +# filter content of build-logs for display on the webserver + +# shellcheck source=conf/default.conf +. "${0%/*}/../conf/default.conf" + +{ + printf '%s\n' \ + '' \ + '' \ + 'Output of namcap of successful builds' \ + '' \ + '' \ + '' \ + '' + printf '' + printf '' \ + 'package' \ + 'type' \ + 'message' + printf '\n' + find "${build_log_directory}/success" -maxdepth 1 -name '*.build-log.gz' -printf '%p\n' | \ + while read -r log; do + zcat "${log}" | \ + sed -n ' + /^Checking PKGBUILD$/{ + :a + $!{ + N + ba + } + p + } + ' + done | \ + sed ' + /^Checking \(PKGBUILD\|\S\+\(-[^-]\+\)\{3\}\.pkg\.tar\.xz\)$/d + / on your system is a testing release$/d + ' | \ + sort -u | \ + while read -r a b c; do + b="${b%:}" + if [ "${b}" = 'E' ]; then + left='' + right='' + else + unset left + unset right + fi + printf '' + printf '' \ + "${left}${a}${right}" "${left}${b}${right}" "${left}${c}${right}" + printf '\n' + done + printf '%s\n' \ + '
%s
%s
' \ + '' \ + '' +} > \ + "${webserver_directory}/namcap-outputs.html" -- cgit v1.2.3