fixed shellcheck errors
This commit is contained in:
parent
2a77dde6ee
commit
ae37de0e65
1 changed files with 2 additions and 3 deletions
|
|
@ -720,12 +720,11 @@ get_remote_file_size()
|
||||||
SIZE="-b2 bucket wrong-"
|
SIZE="-b2 bucket wrong-"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
${B2CMD} authorize-account ${ACC_ID} ${APP_KEY} 2>&1 >/dev/null
|
if [[ $(${B2CMD} authorize-account "${ACC_ID}" "${APP_KEY}" >/dev/null 2>&1) -ne 0 ]]; then
|
||||||
if [[ $? -ne 0 ]]; then
|
|
||||||
SIZE="-b2 authentication wrong-"
|
SIZE="-b2 authentication wrong-"
|
||||||
return
|
return
|
||||||
fi
|
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
|
else
|
||||||
SIZE="-b2 not found in PATH-"
|
SIZE="-b2 not found in PATH-"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue