#!/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 s/^PKGBUILD\s\+(\([^) ]\+\))\s\+/\1 / ' | \ 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"