summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--check-versions.in28
1 files 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