index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Andreas Baumann <mail@andreasbaumann.cc> | 2019-08-10 19:42:10 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2019-08-10 19:42:10 +0200 |
commit | 6386880670fe668a98b8e18f46d54f690818aafa (patch) | |
tree | 0215b2db41277657d9b0b3a9f4e50cd17ac9ceca /bin/manage-fail-reasons | |
parent | d6a60390b4ce8ea3bd9a995ef54089b3bcf2ed26 (diff) |
-rwxr-xr-x | bin/manage-fail-reasons | 14 |
diff --git a/bin/manage-fail-reasons b/bin/manage-fail-reasons index bc7c5bc..f110889 100755 --- a/bin/manage-fail-reasons +++ b/bin/manage-fail-reasons @@ -10,7 +10,7 @@ usage() { >&2 echo '' >&2 echo 'possible actions:' >&2 echo ' list list installed fail reasons' - >&2 echo ' check <build-log> check a build log for fail reasons' + >&2 echo ' check <build-log> check a build log for fail reasons (file or URL)' exit 1 } @@ -36,11 +36,21 @@ case "$1" in ;; 'check') shift - filelog="$1" if [ $# -ne 1 ]; then >&2 printf '"check" expects 1 parameter (a path to a build log), %s were given\n' "$#" usage fi + case "$1" in + http*) + tmp_file=$(mktemp 'tmp.manage-fail-reasons.XXXXXXXXXX' --tmpdir) + trap 'rm "${tmp_file}"' EXIT + wget -q -O "$tmp_file" "$1" + filelog="$tmp_file" + ;; + *) + filelog="$1" + ;; + esac fail_reason_identifiers=$( { printf 'SELECT id,severity,replace(to_base64(`fail_reasons`.`identifier`),"\\n","")' |