From 0f8d2faa6f99e692a334ae2bb4d041c33b098522 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 20 Nov 2019 14:21:01 -0500 Subject: [PATCH] Just use return code from rsync. We don't mind it's verbose output being always output. --- utils/packpack/rsync_xfer.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/utils/packpack/rsync_xfer.sh b/utils/packpack/rsync_xfer.sh index c7562f642..40f5235be 100755 --- a/utils/packpack/rsync_xfer.sh +++ b/utils/packpack/rsync_xfer.sh @@ -27,18 +27,14 @@ if [ "${TRAVIS_EVENT_TYPE}" == "cron" ] || [ "${OS}" == "debian" ] || [ "${OS}" echo if [ "${USE_SFTP}" == "yes" ]; then echo "Running \$(rsync -v -e 'ssh -vvv' build/* zmrepo@zmrepo.zoneminder.com:${targetfolder}/ 2>&1)" - results="$(rsync -v -e 'ssh -vvv' build/* zmrepo@zmrepo.zoneminder.com:${targetfolder}/ 2>&1)" - if [ -z "$results" ]; then + rsync -v -e 'ssh -vvv' build/* zmrepo@zmrepo.zoneminder.com:${targetfolder}/ 2>&1 + if [ $? -eq 0 ]; then echo echo "Files copied successfully." echo else echo echo "ERROR: Attempt to rsync to zmrepo.zoneminder.com failed!" - echo "rsync gave the following error message:" - echo \"$results\" - # Doing this again just for the output - rsync -v -e 'ssh -vvv' build/* zmrepo@zmrepo.zoneminder.com:${targetfolder}/ 2>&1 echo exit 99 fi