From 0413fcd8c5e5a6d324c943663f4ca165554fe6e5 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 20 Jan 2009 22:50:19 +0100 Subject: put: Only show error message if at least one host caused it --- etc/functions/put | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'etc') diff --git a/etc/functions/put b/etc/functions/put index a8b85d9..7c0354a 100755 --- a/etc/functions/put +++ b/etc/functions/put @@ -82,9 +82,9 @@ if [[ -f $1 ]] { } shift hosts } - fdie "Tried uploading to $n_hosts hosts without success\n" \ - " - $n_ping hosts are unreachable\n" \ - " - $n_curl errors while uploading" + fdie "Tried uploading to $n_hosts hosts without success" + ((n_ping)) && fdie " - $n_ping hosts are unreachable" + ((n_curl)) && fdie " - $n_curl errors while uploading" } else { fdie "$1: No such file" } -- cgit v1.2.3