From 2a0ee7c76a45563ace70bc892b23ba326e3a6421 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 25 Oct 2017 14:49:48 +0200 Subject: bin/sanity-check, bin/return-assignment, bin/interpret-mail: state-file suffix "tested" new --- bin/sanity-check | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'bin/sanity-check') diff --git a/bin/sanity-check b/bin/sanity-check index 2977a90..a892e88 100755 --- a/bin/sanity-check +++ b/bin/sanity-check @@ -325,19 +325,23 @@ while [ $# -gt 0 ]; do state-files) - for status in 'staging:done' 'testing:testing'; do + for status in 'staging' 'testing'; do [ ${silence} -gt 0 ] || \ - printf 'checking state-files of "%s" ...' "${status%:*}" >> \ + printf 'checking state-files of "%s" ...' "${status}" >> \ "${tmp_dir}/messages" errors=$( ( - find "${work_dir}/package-states" -name "*.${status#*:}" -exec \ - cat {} \; | \ - sed 's|^|package-state-file |' + if [ "${status}" = 'staging' ]; then + find "${work_dir}/package-states" -name '*.done' \ + -exec sed 's|^|package-state-file |' '{}' \; + else + find "${work_dir}/package-states" \( -name '*.testing' -o -name '*.tested' \) \ + -exec sed 's|^|package-state-file |' '{}' \; + fi ls_master_mirror 'i686' | \ - grep "${status%:*}\$" | \ + grep "${status}\$" | \ while read -r repo; do ls_master_mirror "i686/${repo}" done | \ @@ -352,7 +356,7 @@ while [ $# -gt 0 ]; do if [ -n "${errors}" ]; then if [ ${silence} -le 1 ]; then printf '\nThe following %s packages do not have state files or vice versa:\n%s\n' \ - "${status%:*}" \ + "${status}" \ "${errors}" >> \ "${tmp_dir}/messages" fi -- cgit v1.2.3-70-g09d2