summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-04-03 07:02:32 +0200
committerErich Eckner <git@eckner.net>2017-04-03 07:02:32 +0200
commite656fbaf82067eec91c615d514069dc4c2054d75 (patch)
tree8a5f6139fc3fa0da9e49aae8c45ce09e3994e01b
parentbf2838c660329895db21de910240a436ff073b19 (diff)
downloadcheckVersions-master.tar.xz
be less quietHEADmaster
-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