From ae37de0e6559a37e4fd90ffbc3e9761961ac758f Mon Sep 17 00:00:00 2001 From: harrim4n Date: Sat, 23 Dec 2017 20:01:22 +0100 Subject: [PATCH] fixed shellcheck errors --- duplicity-backup.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/duplicity-backup.sh b/duplicity-backup.sh index 0dcab0d..beb44e1 100755 --- a/duplicity-backup.sh +++ b/duplicity-backup.sh @@ -720,12 +720,11 @@ get_remote_file_size() SIZE="-b2 bucket wrong-" return fi - ${B2CMD} authorize-account ${ACC_ID} ${APP_KEY} 2>&1 >/dev/null - if [[ $? -ne 0 ]]; then + if [[ $(${B2CMD} authorize-account "${ACC_ID}" "${APP_KEY}" >/dev/null 2>&1) -ne 0 ]]; then SIZE="-b2 authentication wrong-" return fi - SIZE=$(${B2CMD} ls --long ${BUCKET} | awk '{ print $5 }' | paste -sd+ | bc | numfmt --to=iec) + SIZE=$(${B2CMD} ls --long "${BUCKET}" | awk '{ print $5 }' | paste -sd+ | bc | numfmt --to=iec) else SIZE="-b2 not found in PATH-" fi