From e656fbaf82067eec91c615d514069dc4c2054d75 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 3 Apr 2017 07:02:32 +0200 Subject: be less quiet --- check-versions.in | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/check-versions.in b/check-versions.in index ef3ac17..8ce5b4b 100644 --- a/check-versions.in +++ b/check-versions.in @@ -4,27 +4,41 @@ set -e . #ETCDIR#/check-versions.conf +print() { + echo -n "$1 (" + grep '^real' "${tmpDir}/$1.time" | \ + awk '{print $2"):"}' + cat "${tmpDir}/${dist}.out" + echo +} + if [ $# -eq 0 ]; then tmpDir="$(mktemp -d)" echo "${!cmds[@]}" | \ tr ' ' '\n' | \ - parallel "$0" "${tmpDir}" "{}" + parallel "$0" "${tmpDir}" "{}" || \ + echo "parallel exited with code $?" + gefunden=false for dist in "${!cmds[@]}"; do if [ -s "${tmpDir}/${dist}.out" ]; then - echo -n "${dist} (" - grep '^real' "${tmpDir}/${dist}.time" | \ - awk '{print $2"):"}' - cat "${tmpDir}/${dist}.out" - echo + gefunden=true + + print "${dist}" fi done - rm -rf "${tmpDir}" + if ! ${gefunden}; then + for dist in "${!cmds[@]}"; do + print "${dist}" + done + fi + + rm -rf "${tmpDir}" else -- cgit v1.2.3-70-g09d2