From e417dd44ea295b9ee3e680ed9dba6a1ed4f6324b Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sat, 5 Jan 2019 22:48:56 +0100 Subject: copyPhotos: max of all ergs should be returned, not the last one --- copyPhotos | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/copyPhotos b/copyPhotos index c085ba6..981cf4c 100755 --- a/copyPhotos +++ b/copyPhotos @@ -132,6 +132,7 @@ then ssh "${endHost}" 'sha512sum -c' fi +erg=${pingErg} pingErg=0 if ${stefanie} @@ -154,6 +155,9 @@ then ssh "${zweitHost}" 'sha512sum -c' fi +if [ ${pingErg} -gt ${erg} ]; then + erg=${pingErg} +fi pingErg=0 if ${backup} @@ -176,6 +180,9 @@ then ssh "${drittHost}" 'sha512sum -c' fi +if [ ${pingErg} -gt ${erg} ]; then + erg=${pingErg} +fi while true do @@ -245,7 +252,7 @@ do esac done -if [ ${pingErg} -eq 0 ] +if [ ${erg} -eq 0 ] then echo "${summen}" | \ sed 's|^[0-9a-f]\+ \+||' | \ -- cgit v1.2.3-54-g00ecf